summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2017-08-17 17:12:05 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-27 07:50:48 -0400
commitd4e192cc44914787cfe1231e2f1f9d0e8855f77b (patch)
treef6ec891eb7e748530f094ea9aab72741b7ee8ae0 /drivers/media
parent3cdb977ec878b23eb6e3380d262985b6a7c93c54 (diff)
downloadop-kernel-dev-d4e192cc44914787cfe1231e2f1f9d0e8855f77b.zip
op-kernel-dev-d4e192cc44914787cfe1231e2f1f9d0e8855f77b.tar.gz
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: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/mx2_emmaprp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c
index 7fd209e..92124ff 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -942,6 +942,8 @@ static int emmaprp_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, pcdev);
irq = platform_get_irq(pdev, 0);
+ if (irq < 0)
+ return irq;
ret = devm_request_irq(&pdev->dev, irq, emmaprp_irq, 0,
dev_name(&pdev->dev), pcdev);
if (ret)
OpenPOWER on IntegriCloud