Skip to content

Commit

Permalink
PCI: check return value of pci_enable_device() when enabling bridges
Browse files Browse the repository at this point in the history
pci_enable_device can fail. In that case, a printed warning would be
more appropriate.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Junchang Wang authored and Jesse Barnes committed Jul 30, 2010
1 parent 7736a05 commit 2eb5ebd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pci/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ void pci_enable_bridges(struct pci_bus *bus)
if (dev->subordinate) {
if (!pci_is_enabled(dev)) {
retval = pci_enable_device(dev);
if (retval)
dev_err(&dev->dev, "Error enabling bridge (%d), continuing\n", retval);
pci_set_master(dev);
}
pci_enable_bridges(dev->subordinate);
Expand Down

0 comments on commit 2eb5ebd

Please sign in to comment.