From 08c8d14e7507d318cbd6ecae2c6c7cb31d0037af Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 4 Jun 2014 15:46:24 -0300 Subject: [PATCH] [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 Acked-by: Philipp Zabel Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/coda.c | 9 +++++---- 1 file 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); -- 2.39.5