From: Cong Wang Date: Tue, 22 Jan 2013 17:39:11 +0000 (+0000) Subject: netpoll: fix an uninitialized variable X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e39363a9def53dd4086be107dc8b3ebca09f045d;p=openwrt%2Fstaging%2Fblogic.git netpoll: fix an uninitialized variable Fengguang reported: net/core/netpoll.c: In function 'netpoll_setup': net/core/netpoll.c:1049:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] in !CONFIG_IPV6 case, we may error out without initializing 'err'. Reported-by: Fengguang Wu Cc: David S. Miller Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/core/netpoll.c b/net/core/netpoll.c index a9b10048388a..e2f79a14625c 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -1140,6 +1140,7 @@ int netpoll_setup(struct netpoll *np) #else np_err(np, "IPv6 is not supported %s, aborting\n", np->dev_name); + err = -EINVAL; goto put; #endif }