Commit d4e192cc authored by Fabio Estevam's avatar Fabio Estevam Committed by Mauro Carvalho Chehab

media: mx2_emmaprp: Check for platform_get_irq() error

platform_get_irq() may fail, so we should better check its return
value and propagate it in the case of error.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 3cdb977e
...@@ -942,6 +942,8 @@ static int emmaprp_probe(struct platform_device *pdev) ...@@ -942,6 +942,8 @@ static int emmaprp_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, pcdev); platform_set_drvdata(pdev, pcdev);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
ret = devm_request_irq(&pdev->dev, irq, emmaprp_irq, 0, ret = devm_request_irq(&pdev->dev, irq, emmaprp_irq, 0,
dev_name(&pdev->dev), pcdev); dev_name(&pdev->dev), pcdev);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment