diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2014-02-17 21:10:51 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-02-18 15:16:55 -0500 |
commit | ed65b78881c713b41051310780f94bde3c010db9 (patch) | |
tree | 8aaceecf359f1bdcb000d373305b49efea81e4b3 /drivers/pci/host | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
PCI: rcar: Check platform_get_irq() return code
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>
Diffstat (limited to 'drivers/pci/host')
-rw-r--r-- | drivers/pci/host/pci-rcar-gen2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c index ceec147baec3..201e4a450340 100644 --- a/drivers/pci/host/pci-rcar-gen2.c +++ b/drivers/pci/host/pci-rcar-gen2.c | |||
@@ -308,6 +308,11 @@ static int __init rcar_pci_probe(struct platform_device *pdev) | |||
308 | priv->reg = reg; | 308 | priv->reg = reg; |
309 | priv->dev = &pdev->dev; | 309 | priv->dev = &pdev->dev; |
310 | 310 | ||
311 | if (priv->irq < 0) { | ||
312 | dev_err(&pdev->dev, "no valid irq found\n"); | ||
313 | return priv->irq; | ||
314 | } | ||
315 | |||
311 | return rcar_pci_add_controller(priv); | 316 | return rcar_pci_add_controller(priv); |
312 | } | 317 | } |
313 | 318 | ||