Browse Source

Input: imx6ul_tsc - check for negative return value

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>
Fabio Estevam 10 years ago
parent
commit
3905de62b2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/input/touchscreen/imx6ul_tsc.c

+ 1 - 1
drivers/input/touchscreen/imx6ul_tsc.c

@@ -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;
 	}