diff options
author | Junchang Wang <junchangwang@gmail.com> | 2010-06-18 04:02:33 +0200 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-07-30 18:29:14 +0200 |
commit | 2eb5ebd3665a38a4526b45cb3a31a132b2aa9927 (patch) | |
tree | 1243c320e14eaf58a1208ccb021b8e70891d85ca /drivers/pci/bus.c | |
parent | PCI: sparse warning (trivial) (diff) | |
download | linux-2eb5ebd3665a38a4526b45cb3a31a132b2aa9927.tar.xz linux-2eb5ebd3665a38a4526b45cb3a31a132b2aa9927.zip |
PCI: check return value of pci_enable_device() when enabling bridges
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>
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 42eea5fbc13b..7f0af0e9b826 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -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); |