From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Alison Schofield <amsfield22@gmail.com>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] staging: iio: ad5933: avoid uninitialized variable in error case
Date: Tue, 25 Oct 2016 18:31:21 +0100 [thread overview]
Message-ID: <26943ae6-ff2a-f521-cb66-1e98a1af8520@kernel.org> (raw)
In-Reply-To: <e2df94af-a165-bd82-aa7f-c9e1f820443a@metafoo.de>
On 25/10/16 18:00, Lars-Peter Clausen wrote:
> On 10/25/2016 06:57 PM, Jonathan Cameron wrote:
>> On 24/10/16 16:22, Arnd Bergmann wrote:
>>> The ad5933_i2c_read function returns an error code to indicate
>>> whether it could read data or not. However ad5933_work() ignores
>>> this return code and just accesses the data unconditionally,
>>> which gets detected by gcc as a possible bug:
>>>
>>> drivers/staging/iio/impedance-analyzer/ad5933.c: In function 'ad5933_work':
>>> drivers/staging/iio/impedance-analyzer/ad5933.c:649:16: warning: 'status' may be used uninitialized in this function [-Wmaybe-uninitialized]
>>>
>>> This adds minimal error handling so we only evaluate the
>>> data if it was correctly read.
>>>
>>> Link: https://patchwork.kernel.org/patch/8110281/
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Looks good to me.
>>
>> Lars?
>>
>
> Looks good, thanks.
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the fixes-togreg branch of iio.git and marked for stable.
thanks,
Jonathan
> --
> 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:[~2016-10-25 17:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 15:22 [PATCH] [v2] staging: iio: ad5933: avoid uninitialized variable in error case Arnd Bergmann
2016-10-25 16:57 ` Jonathan Cameron
2016-10-25 17:00 ` Lars-Peter Clausen
2016-10-25 17:31 ` 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=26943ae6-ff2a-f521-cb66-1e98a1af8520@kernel.org \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=amsfield22@gmail.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.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).