summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-06-04 22:46:24 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-26 07:38:27 +0400
commit08c8d14e7507d318cbd6ecae2c6c7cb31d0037af (patch)
tree68aa1c726f16499322bd1931dde18609adae06fd /drivers/media/platform
parent7d37743a3ef0980432cb4fdf8e3906c54d6fb1dd (diff)
downloadlinux-08c8d14e7507d318cbd6ecae2c6c7cb31d0037af.tar.xz
[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: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/coda.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 840402f57e2b..c44feee1c320 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -3773,10 +3773,11 @@ static int coda_probe(struct platform_device *pdev)
return irq;
}
- if (devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler,
- IRQF_ONESHOT, dev_name(&pdev->dev), dev) < 0) {
- dev_err(&pdev->dev, "failed to request irq\n");
- return -ENOENT;
+ ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler,
+ IRQF_ONESHOT, dev_name(&pdev->dev), dev);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "failed to request irq: %d\n", ret);
+ return ret;
}
dev->rstc = devm_reset_control_get(&pdev->dev, NULL);