From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <brgl@bgdev.pl>
Subject: [PATCH] iio: dummy_evgen: modify the return value check for irq_sim_init()
Date: Mon, 27 Nov 2017 11:54:49 +0100 [thread overview]
Message-ID: <20171127105449.27535-1-brgl@bgdev.pl> (raw)
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>
---
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
next reply other threads:[~2017-11-27 10:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 10:54 Bartosz Golaszewski [this message]
2017-12-02 11:43 ` [PATCH] iio: dummy_evgen: modify the return value check for irq_sim_init() Jonathan Cameron
2017-12-02 15:33 ` Bartosz Golaszewski
2017-12-10 15:02 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171127105449.27535-1-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).