Skip to content

Commit

Permalink
Input: imx6ul_tsc - check for negative return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and Dmitry Torokhov committed Sep 19, 2015
1 parent 6cc527b commit 3905de6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/imx6ul_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3905de6

Please sign in to comment.