From 2a9e79782d99160cad7d834eef9bb77b446e8532 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 25 Nov 2008 16:50:49 -0800 Subject: [PATCH] dsa: fix warning in net/dsa/mv88e6xxx.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: David S. Miller --- net/dsa/mv88e6xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/mv88e6xxx.c b/net/dsa/mv88e6xxx.c index aa6c609c59f2..4e4d8b5ad03d 100644 --- a/net/dsa/mv88e6xxx.c +++ b/net/dsa/mv88e6xxx.c @@ -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; -- 2.30.2