summaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2013-01-22 17:39:11 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-22 23:18:59 -0500
commite39363a9def53dd4086be107dc8b3ebca09f045d (patch)
treea2ce29eef0b7781852f5700c969b3814502c522d /net/core/netpoll.c
parent9647bb80a501a34f06132a04e240156950570005 (diff)
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 <fengguang.wu@intel.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index a9b10048388..e2f79a14625 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
}