[PATCH -mm] zatm_open gcc 4.1 warning fix

From: Daniel Walker
Date: Tue May 09 2006 - 22:56:44 EST


It looks like this warning could be a bug. Where alloc_shaper() could
return without an error, and not touch "pcr" . Needs review ..

Fixes the following warning,

drivers/atm/zatm.c: In function 'zatm_open':
drivers/atm/zatm.c:920: warning: 'pcr' may be used uninitialized in this function

Signed-Off-By: Daniel Walker <dwalker@xxxxxxxxxx>

Index: linux-2.6.16/drivers/atm/zatm.c
===================================================================
--- linux-2.6.16.orig/drivers/atm/zatm.c
+++ linux-2.6.16/drivers/atm/zatm.c
@@ -917,7 +917,8 @@ static int open_tx_first(struct atm_vcc
unsigned long flags;
u32 *loop;
unsigned short chan;
- int pcr,unlimited;
+ int pcr = ATM_OC3_PCR;
+ int unlimited;

DPRINTK("open_tx_first\n");
zatm_dev = ZATM_DEV(vcc->dev);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/