提交 ef0cd87e 编写于 作者: I Ingo Molnar 提交者: 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: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册