From: Jonathan Cameron <jic23@kernel.org>
To: Crt Mori <cmo@melexis.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Linux Iio <linux-iio@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio temperature/mlx90632: silence a static checker warning
Date: Sat, 24 Feb 2018 13:35:47 +0000 [thread overview]
Message-ID: <20180224133547.6f5d3384@archlinux> (raw)
In-Reply-To: <CAKv63uuNqfc9=opZTUOpkdViHUREXKnGj1+u1HB71r0gpvySgQ@mail.gmail.com>
On Thu, 22 Feb 2018 10:26:17 +0100
Crt Mori <cmo@melexis.com> wrote:
> OK, makes sense.
>
> Acked-by: Crt Mori <cmo@melexis.com>
>
Applied to the togreg branch of iio.git and pushed out as testing.
Thanks,
Jonathan
> On 22 February 2018 at 10:14, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > This shouldn't affect runtime at all, but Smatch complains that we
> > should check if mlx90632_read_ambient_raw() otherwise we
> > "ambient_new_raw" can be uninitialized.
> >
> > drivers/iio/temperature/mlx90632.c:509 mlx90632_calc_ambient_dsp105()
> > error: uninitialized symbol 'ambient_new_raw'.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
> > index d695ab97d27f..9851311aa3fd 100644
> > --- a/drivers/iio/temperature/mlx90632.c
> > +++ b/drivers/iio/temperature/mlx90632.c
> > @@ -506,6 +506,8 @@ static int mlx90632_calc_ambient_dsp105(struct mlx90632_data *data, int *val)
> >
> > ret = mlx90632_read_ambient_raw(data->regmap, &ambient_new_raw,
> > &ambient_old_raw);
> > + if (ret < 0)
> > + return ret;
> > *val = mlx90632_calc_temp_ambient(ambient_new_raw, ambient_old_raw,
> > PT, PR, PG, PO, Gb);
> > return ret;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2018-02-24 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 9:14 [PATCH] iio temperature/mlx90632: silence a static checker warning Dan Carpenter
2018-02-22 9:14 ` Dan Carpenter
2018-02-22 9:26 ` Crt Mori
2018-02-22 9:26 ` Crt Mori
2018-02-24 13:35 ` 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=20180224133547.6f5d3384@archlinux \
--to=jic23@kernel.org \
--cc=cmo@melexis.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.