提交 ed65b788 编写于 作者: B Ben Dooks 提交者: Bjorn Helgaas

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: NBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NSimon Horman <horms+renesas@verge.net.au>
上级 38dbfb59
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册