linux/drivers/iio
Pan Bian 81b039ec36 iio: adc: cpcap: fix incorrect validation
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: Pan Bian <bianpan2016@163.com>
Fixes: 25ec249632 ("iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC")
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-12-02 11:15:13 +00:00
..
accel Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
adc iio: adc: cpcap: fix incorrect validation 2017-12-02 11:15:13 +00:00
amplifiers iio:amplifiers:ad8366 drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:24:50 +01:00
buffer License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
chemical iio: chemical: ccs811: Add support for data ready trigger 2017-09-24 12:34:36 +01:00
common treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
counter iio:stm32-lp-timer and ep93xx: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-09-26 09:38:57 +02:00
dac Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
dummy A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
frequency iio:frequency: drop assign iio_info.driver_module 2017-08-22 21:28:20 +01:00
gyro Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
health iio:health: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:29:44 +01:00
humidity Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
imu Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
light Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
magnetometer Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
multiplexer iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values 2017-09-03 18:10:29 +01:00
orientation iio:orientation: drop assign iio_info.driver_module 2017-08-22 21:33:36 +01:00
potentiometer Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
potentiostat iio:potentiostat:lmp91000 drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:34:48 +01:00
pressure Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
proximity Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
temperature Staging/IIO patches for 4.15-rc1 2017-11-13 20:53:28 -08:00
trigger A couple of configfs cleanups: 2017-11-14 14:44:04 -08:00
iio_core_trigger.h
iio_core.h iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
industrialio-buffer.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
industrialio-configfs.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-core.c Merge 4.14-rc4 into staging-next 2017-10-09 09:02:35 +02:00
industrialio-event.c iio: iio_push_event(): Don't crash if the event interface is not registered 2016-09-10 16:40:44 +01:00
industrialio-sw-device.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-sw-trigger.c iio: make function argument and some structures const 2017-10-19 16:15:24 +02:00
industrialio-trigger.c iio:trigger: Remove necessity to have a trig->ops structure. 2017-08-22 21:20:28 +01:00
industrialio-triggered-event.c
inkern.c First round of IIO new device support, features and cleanups for the 4.14 cycle. 2017-07-27 21:29:49 -07:00
Kconfig iio: multiplexer: new iio category and iio-mux driver 2017-06-03 19:29:26 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00