diff options
-rw-r--r-- | MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c index dc1086606f..976496379a 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -1154,19 +1154,13 @@ PciScanBus ( FreePool (Descriptors);
- switch (Status) {
- case EFI_SUCCESS:
- BusPadding = TRUE;
- break;
-
- case EFI_NOT_FOUND:
- //
- // no bus number padding requested
- //
- break;
-
- default:
- return Status;
+ if (!EFI_ERROR (Status)) {
+ BusPadding = TRUE;
+ } else if (Status != EFI_NOT_FOUND) {
+ //
+ // EFI_NOT_FOUND is not a real error. It indicates no bus number padding requested.
+ //
+ return Status;
}
}
}
|