[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171127105449.27535-1-brgl@bgdev.pl>
Date: Mon, 27 Nov 2017 11:54:49 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <brgl@...ev.pl>
Subject: [PATCH] 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@...ev.pl>
---
drivers/iio/dummy/iio_dummy_evgen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.15.0
Powered by blists - more mailing lists