summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c5286b027f00..4f940dcd102c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2920,8 +2920,8 @@ static unsigned int pci_scan_child_bus_extend(struct pci_bus *bus,
* hotplug bridges too much during the second scan below.
*/
used_buses++;
- if (cmax - max > 1)
- used_buses += cmax - max - 1;
+ if (max - cmax > 1)
+ used_buses += max - cmax - 1;
}
/* Scan bridges that need to be reconfigured */