diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2017-02-24 18:00:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-24 20:46:56 -0500 |
commit | 9ef5ea20134e72689b9877e787fa84ab67d77cc5 (patch) | |
tree | 264129302c92539d588cb9d45f17e3f1ea3432b0 | |
parent | 0386bf385d9dbb277ff565765ac9d13fe36232d6 (diff) |
arch/frv/mb93090-mb00/pci-frv.c: fix build warning
The build of frv defconfig gives warning:
arch/frv/mb93090-mb00/pci-frv.c:176:5: warning: ignoring return value of 'pci_assign_resource', declared with attribute warn_unused_result
Just print an error message to silence the warning. We can not do much
here on error.
Link: http://lkml.kernel.org/r/1484256471-5379-1-git-send-email-sudipm.mukherjee@gmail.com
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/frv/mb93090-mb00/pci-frv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c index 34bb4b13e079..c452ddb5620f 100644 --- a/arch/frv/mb93090-mb00/pci-frv.c +++ b/arch/frv/mb93090-mb00/pci-frv.c | |||
@@ -147,7 +147,7 @@ static void __init pcibios_allocate_resources(int pass) | |||
147 | static void __init pcibios_assign_resources(void) | 147 | static void __init pcibios_assign_resources(void) |
148 | { | 148 | { |
149 | struct pci_dev *dev = NULL; | 149 | struct pci_dev *dev = NULL; |
150 | int idx; | 150 | int idx, err; |
151 | struct resource *r; | 151 | struct resource *r; |
152 | 152 | ||
153 | for_each_pci_dev(dev) { | 153 | for_each_pci_dev(dev) { |
@@ -172,8 +172,13 @@ static void __init pcibios_assign_resources(void) | |||
172 | * the BIOS forgot to do so or because we have decided the old | 172 | * the BIOS forgot to do so or because we have decided the old |
173 | * address was unusable for some reason. | 173 | * address was unusable for some reason. |
174 | */ | 174 | */ |
175 | if (!r->start && r->end) | 175 | if (!r->start && r->end) { |
176 | pci_assign_resource(dev, idx); | 176 | err = pci_assign_resource(dev, idx); |
177 | if (err) | ||
178 | dev_err(&dev->dev, | ||
179 | "Failed to assign new address to %d\n", | ||
180 | idx); | ||
181 | } | ||
177 | } | 182 | } |
178 | } | 183 | } |
179 | } | 184 | } |