From 9fc9eea09f518b9bbdc0a14ef668698c913ba614 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Fri, 12 Apr 2013 11:35:40 -0600 Subject: 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 --- drivers/pci/bus.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/pci/bus.c') 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) { -- cgit v1.2.3