Skip to content

Commit

Permalink
PCI: correct resource number in debug output
Browse files Browse the repository at this point in the history
If pci_request_region fails, make the warning include the resource number,
not the resource number + 1.
  • Loading branch information
Jesse Barnes authored and Jesse Barnes committed Jun 25, 2008
1 parent 34438ba commit e4ec7a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,10 +1114,10 @@ int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name)

err_out:
dev_warn(&pdev->dev, "BAR %d: can't reserve %s region [%#llx-%#llx]\n",
bar + 1, /* PCI BAR # */
pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem",
(unsigned long long)pci_resource_start(pdev, bar),
(unsigned long long)pci_resource_end(pdev, bar));
bar,
pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem",
(unsigned long long)pci_resource_start(pdev, bar),
(unsigned long long)pci_resource_end(pdev, bar));
return -EBUSY;
}

Expand Down

0 comments on commit e4ec7a0

Please sign in to comment.