Commit 3905de62 authored by Fabio Estevam's avatar Fabio Estevam Committed by Dmitry Torokhov

Input: imx6ul_tsc - check for negative return value

We should check for negative values returned by platform_get_irq().
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 6cc527b0
...@@ -416,7 +416,7 @@ static int imx6ul_tsc_probe(struct platform_device *pdev) ...@@ -416,7 +416,7 @@ static int imx6ul_tsc_probe(struct platform_device *pdev)
} }
adc_irq = platform_get_irq(pdev, 1); adc_irq = platform_get_irq(pdev, 1);
if (adc_irq <= 0) { if (adc_irq < 0) {
dev_err(&pdev->dev, "no adc irq resource?\n"); dev_err(&pdev->dev, "no adc irq resource?\n");
return adc_irq; return adc_irq;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment