diff options
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 8647dc6f52d0..748f8f3e9ff5 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -202,20 +202,16 @@ void pci_bus_add_devices(const struct pci_bus *bus) if (dev->is_added) continue; retval = pci_bus_add_device(dev); + if (retval) + dev_err(&dev->dev, "Error adding device (%d)\n", + retval); } list_for_each_entry(dev, &bus->devices, bus_list) { BUG_ON(!dev->is_added); - child = dev->subordinate; - - if (!child) - continue; - pci_bus_add_devices(child); - - if (child->is_added) - continue; - child->is_added = 1; + if (child) + pci_bus_add_devices(child); } } |