]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dsa: fix warning in net/dsa/mv88e6xxx.c
authorIngo Molnar <mingo@elte.hu>
Wed, 26 Nov 2008 00:50:49 +0000 (16:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 00:50:49 +0000 (16:50 -0800)
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 <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/mv88e6xxx.c

index aa6c609c59f23f9fbe6d83bb9709722b839e974b..4e4d8b5ad03d3b58fe6c0e353e147b2b78fa5144 100644 (file)
@@ -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;