summary refs log tree commit diff
path: root/drivers/iio/dummy
diff options
context:
space:
mode:
authorBartosz Golaszewski <brgl@bgdev.pl>2017-11-27 11:54:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-08 16:03:41 +0100
commit1b39eacdbdff16bae0e2ca56b3b2a3c1b4b08143 (patch)
tree05cb8dd0fcbc0bbcc6c06d2d8cace6e80fc06cca /drivers/iio/dummy
parent87ad3722bfef925ac2379257cbc512d77d8c4d44 (diff)
downloadlinux-1b39eacdbdff16bae0e2ca56b3b2a3c1b4b08143.tar.gz
iio: dummy_evgen: modify the return value check for irq_sim_init()
As discussed with Marc Zyngier: irq_sim_init() and its devres variant
should return the base of the allocated interrupt range on success
rather than 0. This will be modified later - first, change the way
users handle the return value of these routines.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/dummy')
-rw-r--r--drivers/iio/dummy/iio_dummy_evgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/dummy/iio_dummy_evgen.c b/drivers/iio/dummy/iio_dummy_evgen.c
index fe8884543da0..efd0005f59b4 100644
--- a/drivers/iio/dummy/iio_dummy_evgen.c
+++ b/drivers/iio/dummy/iio_dummy_evgen.c
@@ -56,7 +56,7 @@ static int iio_dummy_evgen_create(void)
 		return -ENOMEM;
 
 	ret = irq_sim_init(&iio_evgen->irq_sim, IIO_EVENTGEN_NO);
-	if (ret) {
+	if (ret < 0) {
 		kfree(iio_evgen);
 		return ret;
 	}