]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
MdeModulePkg/PciBus: Change switch-case to if-else to fix EBC build
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciLib.c
index dc1086606f1808af35a9f7d284211a750c289315..976496379ab2bdcf1cdc3189cce107c98eb64aae 100644 (file)
@@ -1154,19 +1154,13 @@ PciScanBus (
 \r
               FreePool (Descriptors);\r
 \r
-              switch (Status) {\r
-                case EFI_SUCCESS:\r
-                  BusPadding = TRUE;\r
-                  break;\r
-\r
-                case EFI_NOT_FOUND:\r
-                  //\r
-                  // no bus number padding requested\r
-                  //\r
-                  break;\r
-\r
-                default:\r
-                  return Status;\r
+              if (!EFI_ERROR (Status)) {\r
+                BusPadding = TRUE;\r
+              } else if (Status != EFI_NOT_FOUND) {\r
+                //\r
+                // EFI_NOT_FOUND is not a real error. It indicates no bus number padding requested.\r
+                //\r
+                return Status;\r
               }\r
             }\r
           }\r