提交 d3f644da 编写于 作者: I Ingo Molnar 提交者: David S. Miller

dsa: fix warning in net/dsa/mv88e6060.c

this warning:

  net/dsa/mv88e6060.c: In function ‘mv88e6060_poll_link’:
  net/dsa/mv88e6060.c:225: warning: ‘port_status’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between 'link' and 'port_status'.

Annotate it.
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2a9e7978
...@@ -222,7 +222,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds) ...@@ -222,7 +222,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds)
for (i = 0; i < DSA_MAX_PORTS; i++) { for (i = 0; i < DSA_MAX_PORTS; i++) {
struct net_device *dev; struct net_device *dev;
int port_status; int uninitialized_var(port_status);
int link; int link;
int speed; int speed;
int duplex; int duplex;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册