From: Ingo Molnar Date: Wed, 26 Nov 2008 00:51:13 +0000 (-0800) Subject: dsa: fix warning in net/dsa/mv88e6060.c X-Git-Tag: v2.6.29-rc1~581^2~472 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d3f644da909549a4cf0ad27541df342f75158cc0;p=linux-2.6-omap-h63xx.git 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: Ingo Molnar Signed-off-by: David S. Miller --- diff --git a/net/dsa/mv88e6060.c b/net/dsa/mv88e6060.c index 54068ef251e..bfb4a643c86 100644 --- a/net/dsa/mv88e6060.c +++ b/net/dsa/mv88e6060.c @@ -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;