]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
The PCI host bridge can signal failures in its initialization to
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciLib.c
index 9e1184e00a28a2133f9e929d9203466c12abfc74..a5cea9e52a0d2b590569c7dc63cfd275f505c0c4 100644 (file)
@@ -759,7 +759,11 @@ PciHostBridgeResourceAllocator (
   //\r
   // Notify pci bus driver starts to program the resource\r
   //\r
-  NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources);\r
+  Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources);\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   RootBridgeDev     = NULL;\r
 \r
@@ -898,9 +902,9 @@ PciHostBridgeResourceAllocator (
   //\r
   // Notify the resource allocation phase is to end\r
   //\r
-  NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation);\r
+  Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation);\r
 \r
-  return EFI_SUCCESS;\r
+  return Status;\r
 }\r
 \r
 /**\r
@@ -1443,7 +1447,11 @@ PciHostBridgeEnumerator (
   //\r
   // Notify the bus allocation phase is about to start\r
   //\r
-  NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);\r
+  Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   DEBUG((EFI_D_INFO, "PCI Bus First Scanning\n"));\r
   RootBridgeHandle = NULL;\r
@@ -1531,7 +1539,11 @@ PciHostBridgeEnumerator (
     //\r
     // Notify the bus allocation phase is about to start for the 2nd time\r
     //\r
-    NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);\r
+    Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);\r
+\r
+    if (EFI_ERROR (Status)) {\r
+      return Status;\r
+    }\r
 \r
     DEBUG((EFI_D_INFO, "PCI Bus Second Scanning\n"));\r
     RootBridgeHandle = NULL;\r
@@ -1569,7 +1581,11 @@ PciHostBridgeEnumerator (
   //\r
   // Notify the resource allocation phase is to start\r
   //\r
-  NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation);\r
+  Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation);\r
+\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
 \r
   RootBridgeHandle = NULL;\r
   while (PciResAlloc->GetNextRootBridge (PciResAlloc, &RootBridgeHandle) == EFI_SUCCESS) {\r