]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c
StartPciDevicesOnBridge() should correct return value.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciDeviceSupport.c
index bae0109095c585ba22bdec7ddd2f2d6a85793cda..baad1ccd720bda1b540d41db5e40b620369cb08c 100644 (file)
@@ -586,7 +586,7 @@ DeRegisterPciDevice (
 }\r
 \r
 /**\r
-  Start to manage the PCI device on specified the root bridge or PCI-PCI Bridge\r
+  Start to manage the PCI device on the specified root bridge or PCI-PCI Bridge.\r
 \r
   @param Controller          The root bridge handle.\r
   @param RootBridge          A pointer to the PCI_IO_DEVICE.\r
@@ -597,7 +597,7 @@ DeRegisterPciDevice (
   @retval EFI_NOT_READY   Device is not allocated.\r
   @retval EFI_UNSUPPORTED Device only support PCI-PCI bridge.\r
   @retval EFI_NOT_FOUND   Can not find the specific device.\r
-  @retval EFI_SUCCESS     Success to start Pci device on bridge.\r
+  @retval EFI_SUCCESS     Success to start Pci devices on bridge.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -617,6 +617,7 @@ StartPciDevicesOnBridge (
   LIST_ENTRY                *CurrentLink;\r
   UINT64                    Supports;\r
 \r
+  PciIoDevice = NULL;\r
   CurrentLink = RootBridge->ChildList.ForwardLink;\r
 \r
   while (CurrentLink != NULL && CurrentLink != &RootBridge->ChildList) {\r
@@ -749,7 +750,11 @@ StartPciDevicesOnBridge (
     }\r
   }\r
 \r
-  return EFI_NOT_FOUND;\r
+  if (PciIoDevice == NULL) {\r
+    return EFI_NOT_FOUND;\r
+  } else {\r
+    return EFI_SUCCESS;\r
+  }\r
 }\r
 \r
 /**\r