Skip to content

Commit

Permalink
arch/frv/mb93090-mb00/pci-frv.c: fix build warning
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Sudip Mukherjee <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
sudipm-mukherjee authored and torvalds committed Feb 25, 2017
1 parent 0386bf3 commit 9ef5ea2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions arch/frv/mb93090-mb00/pci-frv.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static void __init pcibios_allocate_resources(int pass)
static void __init pcibios_assign_resources(void)
{
struct pci_dev *dev = NULL;
int idx;
int idx, err;
struct resource *r;

for_each_pci_dev(dev) {
Expand All @@ -172,8 +172,13 @@ static void __init pcibios_assign_resources(void)
* the BIOS forgot to do so or because we have decided the old
* address was unusable for some reason.
*/
if (!r->start && r->end)
pci_assign_resource(dev, idx);
if (!r->start && r->end) {
err = pci_assign_resource(dev, idx);
if (err)
dev_err(&dev->dev,
"Failed to assign new address to %d\n",
idx);
}
}
}
}
Expand Down

0 comments on commit 9ef5ea2

Please sign in to comment.