summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c')
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
index 9e1184e00a..a5cea9e52a 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
@@ -759,7 +759,11 @@ PciHostBridgeResourceAllocator (
//
// Notify pci bus driver starts to program the resource
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeSetResources);
+
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
RootBridgeDev = NULL;
@@ -898,9 +902,9 @@ PciHostBridgeResourceAllocator (
//
// Notify the resource allocation phase is to end
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeEndResourceAllocation);
- return EFI_SUCCESS;
+ return Status;
}
/**
@@ -1443,7 +1447,11 @@ PciHostBridgeEnumerator (
//
// Notify the bus allocation phase is about to start
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
DEBUG((EFI_D_INFO, "PCI Bus First Scanning\n"));
RootBridgeHandle = NULL;
@@ -1531,7 +1539,11 @@ PciHostBridgeEnumerator (
//
// Notify the bus allocation phase is about to start for the 2nd time
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginBusAllocation);
+
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
DEBUG((EFI_D_INFO, "PCI Bus Second Scanning\n"));
RootBridgeHandle = NULL;
@@ -1569,7 +1581,11 @@ PciHostBridgeEnumerator (
//
// Notify the resource allocation phase is to start
//
- NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation);
+ Status = NotifyPhase (PciResAlloc, EfiPciHostBridgeBeginResourceAllocation);
+
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
RootBridgeHandle = NULL;
while (PciResAlloc->GetNextRootBridge (PciResAlloc, &RootBridgeHandle) == EFI_SUCCESS) {