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) | |||
202 | if (dev->is_added) | 202 | if (dev->is_added) |
203 | continue; | 203 | continue; |
204 | retval = pci_bus_add_device(dev); | 204 | retval = pci_bus_add_device(dev); |
205 | if (retval) | ||
206 | dev_err(&dev->dev, "Error adding device (%d)\n", | ||
207 | retval); | ||
205 | } | 208 | } |
206 | 209 | ||
207 | list_for_each_entry(dev, &bus->devices, bus_list) { | 210 | list_for_each_entry(dev, &bus->devices, bus_list) { |
208 | BUG_ON(!dev->is_added); | 211 | BUG_ON(!dev->is_added); |
209 | |||
210 | child = dev->subordinate; | 212 | child = dev->subordinate; |
211 | 213 | if (child) | |
212 | if (!child) | 214 | pci_bus_add_devices(child); |
213 | continue; | ||
214 | pci_bus_add_devices(child); | ||
215 | |||
216 | if (child->is_added) | ||
217 | continue; | ||
218 | child->is_added = 1; | ||
219 | } | 215 | } |
220 | } | 216 | } |
221 | 217 | ||