aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-11-26 18:30:04 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-30 13:38:13 -0500
commit4a7267c9a03b9627e5e85c80b307eb4541bab902 (patch)
tree8aa959b2c6ed2feeff33a0eb975025f427f1c462 /drivers/bcma
parent0751f8654602e4255f0b9c17784d8100d5896010 (diff)
bcma: handle return value of pci_assign_resource
This fixes the following warning: CC drivers/bcma/driver_pci_host.o drivers/bcma/driver_pci_host.c: In function 'bcma_core_pci_fixup_addresses': drivers/bcma/driver_pci_host.c:555:23: error: ignoring return value of 'pci_assign_resource', declared with attribute warn_unused_result [-Werror=unused-result] Reported-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma')
-rw-r--r--drivers/bcma/driver_pci_host.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c
index e5644950669..e6b5c89469d 100644
--- a/drivers/bcma/driver_pci_host.c
+++ b/drivers/bcma/driver_pci_host.c
@@ -538,7 +538,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, bcma_core_pci_fixup_pcibridge);
538static void bcma_core_pci_fixup_addresses(struct pci_dev *dev) 538static void bcma_core_pci_fixup_addresses(struct pci_dev *dev)
539{ 539{
540 struct resource *res; 540 struct resource *res;
541 int pos; 541 int pos, err;
542 542
543 if (dev->bus->ops->read != bcma_core_pci_hostmode_read_config) { 543 if (dev->bus->ops->read != bcma_core_pci_hostmode_read_config) {
544 /* This is not a device on the PCI-core bridge. */ 544 /* This is not a device on the PCI-core bridge. */
@@ -551,8 +551,12 @@ static void bcma_core_pci_fixup_addresses(struct pci_dev *dev)
551 551
552 for (pos = 0; pos < 6; pos++) { 552 for (pos = 0; pos < 6; pos++) {
553 res = &dev->resource[pos]; 553 res = &dev->resource[pos];
554 if (res->flags & (IORESOURCE_IO | IORESOURCE_MEM)) 554 if (res->flags & (IORESOURCE_IO | IORESOURCE_MEM)) {
555 pci_assign_resource(dev, pos); 555 err = pci_assign_resource(dev, pos);
556 if (err)
557 pr_err("PCI: Problem fixing up the addresses on %s\n",
558 pci_name(dev));
559 }
556 } 560 }
557} 561}
558DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, bcma_core_pci_fixup_addresses); 562DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, bcma_core_pci_fixup_addresses);