Skip to content

Commit

Permalink
dsa: fix warning in net/dsa/mv88e6xxx.c
Browse files Browse the repository at this point in the history
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: Ingo Molnar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Ingo Molnar authored and davem330 committed Nov 26, 2008
1 parent 55205d4 commit 2a9e797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/mv88e6xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void mv88e6xxx_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 2a9e797

Please sign in to comment.