Skip to content

Commit

Permalink
PCI: rcar: Check platform_get_irq() return code
Browse files Browse the repository at this point in the history
The current code does not check the return from platform_get_irq() so add
an error check and return if this call does fail.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
  • Loading branch information
Ben Dooks authored and Bjorn Helgaas committed Feb 18, 2014
1 parent 38dbfb5 commit ed65b78
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/pci/host/pci-rcar-gen2.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ static int __init rcar_pci_probe(struct platform_device *pdev)
priv->reg = reg;
priv->dev = &pdev->dev;

if (priv->irq < 0) {
dev_err(&pdev->dev, "no valid irq found\n");
return priv->irq;
}

return rcar_pci_add_controller(priv);
}

Expand Down

0 comments on commit ed65b78

Please sign in to comment.