From e39363a9def53dd4086be107dc8b3ebca09f045d Mon Sep 17 00:00:00 2001 From: Cong Wang Date: Tue, 22 Jan 2013 17:39:11 +0000 Subject: [PATCH] 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 --- net/core/netpoll.c | 1 + 1 file changed, 1 insertion(+) 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 } -- 2.30.2