From: Jonathan Cameron <jic23@kernel.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: sca3000: Fix missing return in switch
Date: Sun, 8 Jul 2018 12:05:30 +0100 [thread overview]
Message-ID: <20180708120530.0de30fcc@archlinux> (raw)
In-Reply-To: <20180707174401.GA11730@embeddedor.com>
On Sat, 7 Jul 2018 12:44:01 -0500
"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
> The IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY case is missing a
> return and will fall through to the default case and errorenously
> return -EINVAL.
>
> Fix this by adding in missing *return ret*.
>
> Fixes: 626f971b5b07 ("staging:iio:accel:sca3000 Add write support to the low pass filter control")
> Reported-by: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Thanks, Applied to the fixes-togreg branch of iio.git, marked for stable.
Jonathan
> ---
> drivers/iio/accel/sca3000.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
> index 4dceb75..4964561 100644
> --- a/drivers/iio/accel/sca3000.c
> +++ b/drivers/iio/accel/sca3000.c
> @@ -797,6 +797,7 @@ static int sca3000_write_raw(struct iio_dev *indio_dev,
> mutex_lock(&st->lock);
> ret = sca3000_write_3db_freq(st, val);
> mutex_unlock(&st->lock);
> + return ret;
> default:
> return -EINVAL;
> }
prev parent reply other threads:[~2018-07-08 11:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 17:44 [PATCH] iio: sca3000: Fix missing return in switch Gustavo A. R. Silva
2018-07-08 11:05 ` Jonathan Cameron [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=20180708120530.0de30fcc@archlinux \
--to=jic23@kernel.org \
--cc=gustavo@embeddedor.com \
--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