From ef0cd87ef6326609be8abf19030101be24cc5703 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 25 Nov 2008 16:52:13 -0800 Subject: [PATCH] sis900: fix warning in drivers/net/sis900.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- drivers/net/sis900.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index de740ebfafb6..eb715f1bcd48 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){ -- 2.30.2