Skip to content

Commit

Permalink
PCI hotplug: shpchp: fix bus number check to avoid false positive
Browse files Browse the repository at this point in the history
With for (busnr = 0; busnr <= end; busnr++) { ... } busnr reaches end + 1
after the loop.  So fix the "no busses available" check to look for just
busnr > end rather than >=.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Roel Kluin authored and Jesse Barnes committed Mar 20, 2009
1 parent 9f5404d commit 35e1801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/shpchp_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ int __ref shpchp_configure_device(struct slot *p_slot)
busnr))
break;
}
if (busnr >= end) {
if (busnr > end) {
ctrl_err(ctrl,
"No free bus for hot-added bridge\n");
pci_dev_put(dev);
Expand Down

0 comments on commit 35e1801

Please sign in to comment.