From: Fabio Estevam Date: Thu, 17 Aug 2017 21:12:05 +0000 (-0400) Subject: media: mx2_emmaprp: Check for platform_get_irq() error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4e192cc44914787cfe1231e2f1f9d0e8855f77b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index 7fd209e51140..92124ffc4d8b 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)