Skip to content

Commit

Permalink
dsa: fix warning in net/dsa/mv88e6060.c
Browse files Browse the repository at this point in the history
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: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ingo Molnar authored and David S. Miller committed Nov 26, 2008
1 parent 2a9e797 commit d3f644d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/mv88e6060.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds)

for (i = 0; i < DSA_MAX_PORTS; i++) {
struct net_device *dev;
int port_status;
int uninitialized_var(port_status);
int link;
int speed;
int duplex;
Expand Down

0 comments on commit d3f644d

Please sign in to comment.