Input: imx6ul_tsc - check for negative return value
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 14 Sep 2015 17:37:08 +0000 (10:37 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 19 Sep 2015 18:41:53 +0000 (11:41 -0700)
We should check for negative values returned by platform_get_irq().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/imx6ul_tsc.c

index 0a96b76f60214d9653525d132cd3b2d58b7de790..4957d8b6ca59da47d62b52c125e02eca7d653ab6 100644 (file)
@@ -416,7 +416,7 @@ static int imx6ul_tsc_probe(struct platform_device *pdev)
        }
 
        adc_irq = platform_get_irq(pdev, 1);
-       if (adc_irq <= 0) {
+       if (adc_irq < 0) {
                dev_err(&pdev->dev, "no adc irq resource?\n");
                return adc_irq;
        }