Skip to content
Commit f27b1b2a authored by Tang Bin's avatar Tang Bin Committed by Jonathan Cameron
Browse files

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: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210802120929.33760-1-tangbin@cmss.chinamobile.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 6a25893c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment