* [PATCH] vortex_up should initialize "err"
@ 2007-10-17 23:15 Badari Pulavarty
2007-10-18 0:28 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Badari Pulavarty @ 2007-10-17 23:15 UTC (permalink / raw)
To: netdev; +Cc: lkml
Simple compile warning fix. (against 2.6.23-git12)
Thanks,
Badari
vortex_up() should initialize 'err' for a successful return.
drivers/net/3c59x.c: In function `vortex_up':
drivers/net/3c59x.c:1494: warning: `err' might be used uninitialized in this function
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
---
drivers/net/3c59x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.23/drivers/net/3c59x.c
===================================================================
--- linux-2.6.23.orig/drivers/net/3c59x.c 2007-10-17 15:33:07.000000000 -0700
+++ linux-2.6.23/drivers/net/3c59x.c 2007-10-17 16:07:10.000000000 -0700
@@ -1491,7 +1491,7 @@ vortex_up(struct net_device *dev)
struct vortex_private *vp = netdev_priv(dev);
void __iomem *ioaddr = vp->ioaddr;
unsigned int config;
- int i, mii_reg1, mii_reg5, err;
+ int i, mii_reg1, mii_reg5, err = 0;
if (VORTEX_PCI(vp)) {
pci_set_power_state(VORTEX_PCI(vp), PCI_D0); /* Go active */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vortex_up should initialize "err"
2007-10-17 23:15 [PATCH] vortex_up should initialize "err" Badari Pulavarty
@ 2007-10-18 0:28 ` Jeff Garzik
2007-10-18 6:05 ` Steffen Klassert
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2007-10-18 0:28 UTC (permalink / raw)
To: Badari Pulavarty; +Cc: netdev, lkml, Steffen Klassert
Badari Pulavarty wrote:
> Simple compile warning fix. (against 2.6.23-git12)
>
> Thanks,
> Badari
>
> vortex_up() should initialize 'err' for a successful return.
>
> drivers/net/3c59x.c: In function `vortex_up':
> drivers/net/3c59x.c:1494: warning: `err' might be used uninitialized in this function
applied as an obvious bug fix (Steffen added to CC)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vortex_up should initialize "err"
2007-10-18 0:28 ` Jeff Garzik
@ 2007-10-18 6:05 ` Steffen Klassert
2007-10-18 6:58 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Steffen Klassert @ 2007-10-18 6:05 UTC (permalink / raw)
To: Jeff Garzik, akpm; +Cc: Badari Pulavarty, netdev, lkml, satyam
On Wed, Oct 17, 2007 at 08:28:36PM -0400, Jeff Garzik wrote:
> Badari Pulavarty wrote:
> >Simple compile warning fix. (against 2.6.23-git12)
> >
> >Thanks,
> >Badari
> >
> >vortex_up() should initialize 'err' for a successful return.
> >
> >drivers/net/3c59x.c: In function `vortex_up':
> >drivers/net/3c59x.c:1494: warning: `err' might be used uninitialized in
> >this function
>
> applied as an obvious bug fix (Steffen added to CC)
>
Hm, we had already the 3c59x-fix-uninitialized-variable-bug.patch from
Satyam Sharma in -mm to fix this, but the patch was removed from -mm
some time ago. Andrew, what happened to this one?
However, this issue should be fixed.
Thanks,
Steffen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vortex_up should initialize "err"
2007-10-18 6:05 ` Steffen Klassert
@ 2007-10-18 6:58 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2007-10-18 6:58 UTC (permalink / raw)
To: Steffen Klassert; +Cc: Jeff Garzik, Badari Pulavarty, netdev, lkml, satyam
On Thu, 18 Oct 2007 08:05:06 +0200 Steffen Klassert <klassert@mathematik.tu-chemnitz.de> wrote:
> On Wed, Oct 17, 2007 at 08:28:36PM -0400, Jeff Garzik wrote:
> > Badari Pulavarty wrote:
> > >Simple compile warning fix. (against 2.6.23-git12)
> > >
> > >Thanks,
> > >Badari
> > >
> > >vortex_up() should initialize 'err' for a successful return.
> > >
> > >drivers/net/3c59x.c: In function `vortex_up':
> > >drivers/net/3c59x.c:1494: warning: `err' might be used uninitialized in
> > >this function
> >
> > applied as an obvious bug fix (Steffen added to CC)
> >
>
> Hm, we had already the 3c59x-fix-uninitialized-variable-bug.patch from
> Satyam Sharma in -mm to fix this, but the patch was removed from -mm
> some time ago. Andrew, what happened to this one?
It's fixed in Jeff's netdev tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-18 7:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17 23:15 [PATCH] vortex_up should initialize "err" Badari Pulavarty
2007-10-18 0:28 ` Jeff Garzik
2007-10-18 6:05 ` Steffen Klassert
2007-10-18 6:58 ` Andrew Morton
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).