Merger tracker:Fixed a Pci bus driver logic error
[people/mcb30/edk2.git] / edk2 / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / PciEnumerator.c
index b5b3568..edb12f6 100644 (file)
@@ -1046,10 +1046,14 @@ Returns:
     //\r
     for (DevIndex = 0; DevIndex < RemovedPciDevNum; DevIndex++) {\r
       if (PciResNode->PciDev == RemovedPciDev[DevIndex]) {\r
-        continue;\r
+        break;\r
       }\r
     }\r
 \r
+    if (DevIndex != RemovedPciDevNum) {\r
+      continue;\r
+    }\r
+\r
     //\r
     // Remove the device if it isn't in the array\r
     //\r