summaryrefslogtreecommitdiff
path: root/drivers/pci/bus.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-04-12 11:35:40 -0600
committerBjorn Helgaas <bhelgaas@google.com>2013-04-17 10:21:12 -0600
commit9fc9eea09f518b9bbdc0a14ef668698c913ba614 (patch)
tree3e1b6cb29f75de5b9a0aa1db371a6fc3332d2d07 /drivers/pci/bus.c
parentd67aed63b8bfa4a06575ed578328b02f909699ee (diff)
PCI: Warn about failures instead of "must_check" functions
These places capture return values to avoid "must_check" warnings, but we didn't *do* anything with the return values, which causes "set but not used" warnings. We might as well do something instead of just trying to evade the "must_check" warnings. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r--drivers/pci/bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 8647dc6f52d0..ee4c4c4fde17 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -202,6 +202,9 @@ 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) {