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

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

this warning:

  net/dsa/mv88e6xxx.c: In function ‘mv88e6xxx_poll_link’:
  net/dsa/mv88e6xxx.c:361: 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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 55205d40
...@@ -358,7 +358,7 @@ void mv88e6xxx_poll_link(struct dsa_switch *ds) ...@@ -358,7 +358,7 @@ void mv88e6xxx_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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment