diff options
author | Yijing Wang <wangyijing@huawei.com> | 2014-05-30 11:01:03 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-05-30 09:34:27 -0600 |
commit | c893d133eaccdda2516a3e71cd05a7dac2e14b00 (patch) | |
tree | 2f296b5a88e4e794fb48d4c22c8108ce6f671bbc /drivers/pci/bus.c | |
parent | d97ffe236894856d08146390ef3fbe6448a8ac2b (diff) | |
download | op-kernel-dev-c893d133eaccdda2516a3e71cd05a7dac2e14b00.zip op-kernel-dev-c893d133eaccdda2516a3e71cd05a7dac2e14b00.tar.gz |
PCI: Make pci_bus_add_device() void
pci_bus_add_device() always returns 0, so there's no point in returning
anything at all. Make it a void function and remove the tests of the
return value from the callers.
[bhelgaas: changelog, remove unused "err" from i82875p_setup_overfl_dev()]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index ba2bf55..447d393 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c @@ -235,7 +235,7 @@ void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { } * * This adds add sysfs entries and start device drivers */ -int pci_bus_add_device(struct pci_dev *dev) +void pci_bus_add_device(struct pci_dev *dev) { int retval; @@ -252,8 +252,6 @@ int pci_bus_add_device(struct pci_dev *dev) WARN_ON(retval < 0); dev->is_added = 1; - - return 0; } /** @@ -266,16 +264,12 @@ void pci_bus_add_devices(const struct pci_bus *bus) { struct pci_dev *dev; struct pci_bus *child; - int retval; list_for_each_entry(dev, &bus->devices, bus_list) { /* Skip already-added devices */ if (dev->is_added) continue; - retval = pci_bus_add_device(dev); - if (retval) - dev_err(&dev->dev, "Error adding device (%d)\n", - retval); + pci_bus_add_device(dev); } list_for_each_entry(dev, &bus->devices, bus_list) { |