[media] coda: Propagate the correct error on devm_request_threaded_irq()
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 4 Jun 2014 18:46:24 +0000 (15:46 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 26 Jul 2014 03:38:27 +0000 (00:38 -0300)
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>
drivers/media/platform/coda.c

index 840402f57e2b9494a601f999fd7989c9b6f3334a..c44feee1c320bac41ede197d7fe51848831ee49e 100644 (file)
@@ -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);