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>
This commit is contained in:
Fabio Estevam 2015-09-14 10:37:08 -07:00 committed by Dmitry Torokhov
parent 6cc527b058
commit 3905de62b2

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