iio: adc: fsl-imx25-gcq: adjust irq check to match docs and simplify code
authorTang Bin <tangbin@cmss.chinamobile.com>
Mon, 2 Aug 2021 12:09:29 +0000 (20:09 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Aug 2021 13:52:23 +0000 (14:52 +0100)
commitf27b1b2a04dda77454659e0b2572afe9620b55ec
treee79dcb7534384e4275b42f73fad5e1510e8b97d2
parent6a25893cb0e255ab8888d6a4f40e8d1e9d554ad0
iio: adc: fsl-imx25-gcq: adjust irq check to match docs and simplify code

For the function of platform_get_irq(), the example in platform.c is
 * int irq = platform_get_irq(pdev, 0);
 * if (irq < 0)
 * return irq;
the return value of zero is unnecessary to check, so make the right
check and simplify code.

Note that platform_get_irq() is documented as never returning 0
so this is a minor optmization rather than a fix.

Co-developed-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210802120929.33760-1-tangbin@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/fsl-imx25-gcq.c