Message ID | 20230210085052.3083756-2-tjaalton@ubuntu.com |
---|---|
State | New |
Headers | show |
Series | Rest of the bugfixes from oem-5.17 | expand |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 4948531481d1..d7073b06dbc5 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -2917,8 +2917,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 */