From: Jonathan Cameron <jic23@kernel.org>
To: "Maxime Roussin-Bélanger" <maxime.roussinbelanger@gmail.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
Subject: Re: [PATCH v2] iio: light: si1133: fix uninitialized resp variable
Date: Wed, 1 Aug 2018 19:02:40 +0100 [thread overview]
Message-ID: <20180801190240.3e0d2eb6@archlinux> (raw)
In-Reply-To: <20180731201321.17178-1-maxime.roussinbelanger@gmail.com>
On Tue, 31 Jul 2018 16:13:21 -0400
Maxime Roussin-B=C3=A9langer <maxime.roussinbelanger@gmail.com> wrote:
> Read response register to detect any error.
>=20
> Signed-off-by: Maxime Roussin-B=C3=A9langer <maxime.roussinbelanger@gmail=
.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks. Given the announced delay in the merge window opening I'm
going to make an optimistic pull request and this just snuck in.
Applied to the togreg branch of iio.git.
Thanks,
Jonathan
> ---
> Changes in v2:
> - Added missing signed-off-by
>=20
> drivers/iio/light/si1133.c | 3 +++
> 1 file changed, 3 insertions(+)
>=20
> diff --git a/drivers/iio/light/si1133.c b/drivers/iio/light/si1133.c
> index d3fbeb3bc463..9b8862af0127 100644
> --- a/drivers/iio/light/si1133.c
> +++ b/drivers/iio/light/si1133.c
> @@ -409,6 +409,9 @@ static int si1133_command(struct si1133_data *data, u=
8 cmd)
> err =3D -ETIMEDOUT;
> goto out;
> }
> + err =3D regmap_read(data->regmap, SI1133_REG_RESPONSE0, &resp);
> + if (err)
> + goto out;
> } else {
> err =3D regmap_read_poll_timeout(data->regmap,
> SI1133_REG_RESPONSE0, resp,
prev parent reply other threads:[~2018-08-01 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 20:13 [PATCH v2] iio: light: si1133: fix uninitialized resp variable Maxime Roussin-Bélanger
2018-08-01 18:02 ` 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=20180801190240.3e0d2eb6@archlinux \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=maxime.roussinbelanger@gmail.com \
--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).