From: Mark Hindley <mark@hindley.org.uk>
To: Satyam Sharma <satyam@infradead.org>
Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Netdev Mailing List <netdev@vger.kernel.org>,
Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH -mm 1/2] 3c59x: Fix uninitialized variable bug
Date: Tue, 4 Sep 2007 09:53:31 +0100 [thread overview]
Message-ID: <20070904085331.GH5944@hindley.org.uk> (raw)
In-Reply-To: 20070904081602.GB4241@newton.mathematik.tu-chemnitz.de
On Tue, Sep 04, 2007 at 02:09:47PM +0530, Satyam Sharma wrote:
> Hi Steffen,
>
>
> On Tue, 4 Sep 2007, Steffen Klassert wrote:
>
> > On Tue, Sep 04, 2007 at 03:45:55AM +0530, Satyam Sharma wrote:
> > >
> > > drivers/net/3c59x.c: In function 'vortex_up':
> > > drivers/net/3c59x.c:1495: warning: 'err' may be used uninitialized in this function
> >
> > This came in with the recently applied 3c59x-check-return-of-pci_enable_device patch
> > from Mark Hindley. I just compiled it on a PCI only machine so far, therefore I did
> > not notice the warning yet.
>
> Hmm, the .config I built with had PCI=y as well. Probably a compiler
> version difference -- Jeff also mentioned yesterday that some newer
> GCC versions fail to warn about uninitialized variables cases.
>
Sorry, this is my bad. I have just checked: there is no warning with gcc
4.2 or 4.1, but 3.3 emits the warning.
>
> > > is a genuine bug. The function returns an uninitialized value of 'err'
> > > back to the caller, which expects it to be 0 for success cases. Let's
> > > fix this by explicitly initializing 'err' to zero.
> > >
> > > Signed-off-by: Satyam Sharma <satyam@infradead.org>
> > Acked-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Acked-by: Mark Hindley <mark@hindley.org.uk>
next prev parent reply other threads:[~2007-09-04 8:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.0.999.0709040340250.8504@enigma.security.iitk.ac.in >
2007-09-03 22:15 ` [PATCH -mm 1/2] 3c59x: Fix uninitialized variable bug Satyam Sharma
2007-09-03 22:22 ` [PATCH -mm 2/2] 3c59x MAINTAINERS Satyam Sharma
2007-09-04 7:55 ` Steffen Klassert
2007-09-04 8:16 ` [PATCH -mm 1/2] 3c59x: Fix uninitialized variable bug Steffen Klassert
2007-09-04 8:39 ` Satyam Sharma
2007-09-04 8:53 ` Mark Hindley [this message]
2007-09-04 9:17 ` Steffen Klassert
2007-09-04 9:35 ` Mark Hindley
2007-09-04 9:39 ` Steffen Klassert
2007-09-06 9:55 ` Satyam Sharma
2007-09-06 21:40 ` Mark Hindley
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=20070904085331.GH5944@hindley.org.uk \
--to=mark@hindley.org.uk \
--cc=jeff@garzik.org \
--cc=klassert@mathematik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=satyam@infradead.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).