]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c
Refine soma code to make code run safely.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciIo.c
index fe67dc20cd2a89c4d49c6413b1dbc0af54123e4d..0969407831d85fd48414dd542235fbea3cb0787e 100644 (file)
@@ -1637,7 +1637,7 @@ PciIoGetBarAttributes (
 \r
     if (NumConfig == 1) {\r
       Ptr->Desc         = ACPI_ADDRESS_SPACE_DESCRIPTOR;\r
-      Ptr->Len          = sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3;\r
+      Ptr->Len          = (UINT16) (sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3);\r
 \r
       Ptr->AddrRangeMin = PciIoDevice->PciBar[BarIndex].BaseAddress;\r
       Ptr->AddrLen      = PciIoDevice->PciBar[BarIndex].Length;\r