Commit ef0cd87e authored by Ingo Molnar's avatar Ingo Molnar Committed by David S. Miller

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 180b65df
......@@ -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){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment