From: Ingo Molnar Date: Wed, 26 Nov 2008 00:52:13 +0000 (-0800) Subject: sis900: fix warning in drivers/net/sis900.c X-Git-Tag: v2.6.29-rc1~581^2~470 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ef0cd87ef6326609be8abf19030101be24cc5703;p=linux-2.6-omap-h63xx.git sis900: fix warning in drivers/net/sis900.c this warning: drivers/net/sis900.c: In function ‘sis900_timer’: drivers/net/sis900.c:1280: warning: ‘speed’ may be used uninitialized in this function triggers because GCC does not recognize the (correct) error flow between sis900_read_mode(), 'speed' and 'duplex'. Annotate it. Signed-off-by: Ingo Molnar Signed-off-by: David S. Miller --- diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index de740ebfafb..eb715f1bcd4 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c @@ -1281,7 +1281,7 @@ static void sis900_timer(unsigned long data) u16 status; if (!sis_priv->autong_complete){ - int speed, duplex = 0; + int uninitialized_var(speed), duplex = 0; sis900_read_mode(net_dev, &speed, &duplex); if (duplex){