-
由 Pan Bian 提交于
Function platform_get_irq_byname() returns a negative error code on failure, and a zero or positive number on success. However, in function cpcap_adc_probe(), positive IRQ numbers are also taken as error cases. Use "if (ddata->irq < 0)" instead of "if (!ddata->irq)" to validate the return value of platform_get_irq_byname(). Signed-off-by: NPan Bian <bianpan2016@163.com> Fixes: 25ec2496 ("iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC") Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: NTony Lindgren <tony@atomide.com> Cc: <Stable@vger.kernel.org> Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
81b039ec