Re: [PATCH] vortex_up should initialize "err"

Previous thread: [PATCH] ip_gra_reasm() should set "err" incase of skb_clone() failure by Badari Pulavarty on Wednesday, October 17, 2007 - 7:02 pm. (1 message)

Next thread: [PATCH] Move _rtc_time() routines under CONFIG_ADB_CUDA by Badari Pulavarty on Wednesday, October 17, 2007 - 7:09 pm. (1 message)
To: <netdev@...>
Cc: lkml <linux-kernel@...>
Date: Wednesday, October 17, 2007 - 7:15 pm

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 */

-

To: Badari Pulavarty <pbadari@...>
Cc: <netdev@...>, lkml <linux-kernel@...>, Steffen Klassert <klassert@...>
Date: Wednesday, October 17, 2007 - 8:28 pm

applied as an obvious bug fix (Steffen added to CC)

-

To: Jeff Garzik <jeff@...>, <akpm@...>
Cc: Badari Pulavarty <pbadari@...>, <netdev@...>, lkml <linux-kernel@...>, <satyam@...>
Date: Thursday, October 18, 2007 - 2:05 am

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
-

To: Steffen Klassert <klassert@...>
Cc: Jeff Garzik <jeff@...>, Badari Pulavarty <pbadari@...>, <netdev@...>, lkml <linux-kernel@...>, <satyam@...>
Date: Thursday, October 18, 2007 - 2:58 am

It's fixed in Jeff's netdev tree.
-

Previous thread: [PATCH] ip_gra_reasm() should set "err" incase of skb_clone() failure by Badari Pulavarty on Wednesday, October 17, 2007 - 7:02 pm. (1 message)

Next thread: [PATCH] Move _rtc_time() routines under CONFIG_ADB_CUDA by Badari Pulavarty on Wednesday, October 17, 2007 - 7:09 pm. (1 message)