From: Luis de Bethencourt <luisbg@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, knaack.h@gmx.de, lars@metafoo.de,
jic23@kernel.org, ciorneiioana@gmail.com,
janani.rvchndrn@gmail.com, afd@ti.com, linux-iio@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: Re: [PATCH 1/2] staging: iio: accel: fix error check
Date: Tue, 31 May 2016 22:10:10 +0100 [thread overview]
Message-ID: <574DFDB2.4070503@osg.samsung.com> (raw)
In-Reply-To: <1464728884-29686-1-git-send-email-luisbg@osg.samsung.com>
On 31/05/16 22:08, Luis de Bethencourt wrote:
> sca3000_read_ctrl_reg() returns a negative number on failure, check for
> this instead of zero.
>
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> Reviewed-by: Andrew F. Davis <afd@ti.com>
> Reviewed-by: Jonathan Cameron <jic23@kernel.org>
> ---
>
> Patch corrected thanks to comments from Andrew F. Davis and Jonathan Cameron.
> https://lkml.org/lkml/2016/5/31/862
>
> Thanks,
> Luis
>
> drivers/staging/iio/accel/sca3000_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
> index a8f533a..ec12181 100644
> --- a/drivers/staging/iio/accel/sca3000_core.c
> +++ b/drivers/staging/iio/accel/sca3000_core.c
> @@ -594,7 +594,7 @@ static ssize_t sca3000_read_frequency(struct device *dev,
> goto error_ret_mut;
> ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL);
> mutex_unlock(&st->lock);
> - if (ret)
> + if (ret < 0)
> goto error_ret;
> val = ret;
> if (base_freq > 0)
>
I sent this with git send-email using --subject-prefix="PATCH v2", no idea why the version wasn't
added.
Apologies,
Luis
prev parent reply other threads:[~2016-05-31 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 21:08 [PATCH 1/2] staging: iio: accel: fix error check Luis de Bethencourt
2016-05-31 21:08 ` [PATCH 2/2] staging: iio: accel: add " Luis de Bethencourt
2016-05-31 21:10 ` Luis de Bethencourt [this message]
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=574DFDB2.4070503@osg.samsung.com \
--to=luisbg@osg.samsung.com \
--cc=afd@ti.com \
--cc=ciorneiioana@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=janani.rvchndrn@gmail.com \
--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 \
/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).