From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] Staging: bcm2835-audio: fix an uninitialized return value
Date: Tue, 07 Feb 2017 14:15:54 +0000 [thread overview]
Message-ID: <20170207141553.GD11154@mwanda> (raw)
In-Reply-To: <20170207131734.GC27416@mwanda>
On Tue, Feb 07, 2017 at 03:01:23PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 7, 2017 at 2:17 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > "ret" isn't necessarily initialized on the success path.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
>
> The patch seems correct, but do you have any idea why gcc-7 didn't
> warn about this?
Heh... I'm not a gcc dev. Checking for uninitialized variables is
harder than I would have thought though..
> I assume that you found it with smatch, and nobody else did.
Yep. I'm getting close to releasing my uninitialized variable check.
I guess the one thing holding me back is that I still have tons of false
positives caused by mismatches between "if (ret)" and "if (ret < 0)"
where the function assumes that non-zero is an error but the caller
assumes that errors are negative.
regards,
dan carpenter
prev parent reply other threads:[~2017-02-07 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 13:17 [patch] Staging: bcm2835-audio: fix an uninitialized return value Dan Carpenter
2017-02-07 14:01 ` Arnd Bergmann
2017-02-07 14:15 ` Dan Carpenter [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=20170207141553.GD11154@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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).