Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed65b788 authored by Ben Dooks's avatar Ben Dooks Committed by Bjorn Helgaas
Browse files

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: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 38dbfb59
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
}