]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
Change the PciBusDxe driver to install the PCI enumeration complete GUID in the PCI...
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciEnumerator.c
index bd1e6804661c9387994a3a406c9c16d349daa8da..732914313607ec2d44f72e745b6a977abe206c4b 100644 (file)
@@ -29,7 +29,6 @@ PciEnumerator (
   IN EFI_HANDLE                    Controller\r
   )\r
 {\r
-  EFI_HANDLE                                        Handle;\r
   EFI_HANDLE                                        HostBridgeHandle;\r
   EFI_STATUS                                        Status;\r
   EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL  *PciResAlloc;\r
@@ -82,7 +81,11 @@ PciEnumerator (
   //\r
   // Notify the pci bus enumeration is about to begin\r
   //\r
-  NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginEnumeration);\r
+  Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginEnumeration);\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   //\r
   // Start the bus allocation phase\r
@@ -105,7 +108,11 @@ PciEnumerator (
   //\r
   // Notify the pci bus enumeration is about to complete\r
   //\r
-  NotifyPhase (PciResAlloc, EfiPciHostBridgeEndEnumeration);\r
+  Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeEndEnumeration);\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   //\r
   // Process P2C\r
@@ -126,9 +133,8 @@ PciEnumerator (
 \r
   gFullEnumeration = FALSE;\r
 \r
-  Handle = NULL;\r
   Status = gBS->InstallProtocolInterface (\r
-                  &Handle,\r
+                  &HostBridgeHandle,\r
                   &gEfiPciEnumerationCompleteProtocolGuid,\r
                   EFI_NATIVE_INTERFACE,\r
                   NULL\r