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

[media] coda: Propagate the correct error on devm_request_threaded_irq()

If devm_request_threaded_irq() fails, we should better propagate the real error.

Also, print out the error code in the dev_err message.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 7d37743a
...@@ -3773,10 +3773,11 @@ static int coda_probe(struct platform_device *pdev) ...@@ -3773,10 +3773,11 @@ static int coda_probe(struct platform_device *pdev)
return irq; return irq;
} }
if (devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler, ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler,
IRQF_ONESHOT, dev_name(&pdev->dev), dev) < 0) { IRQF_ONESHOT, dev_name(&pdev->dev), dev);
dev_err(&pdev->dev, "failed to request irq\n"); if (ret < 0) {
return -ENOENT; dev_err(&pdev->dev, "failed to request irq: %d\n", ret);
return ret;
} }
dev->rstc = devm_reset_control_get(&pdev->dev, NULL); dev->rstc = devm_reset_control_get(&pdev->dev, NULL);
......
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