diff options
author | Cong Wang <amwang@redhat.com> | 2013-01-22 18:39:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-23 05:18:59 +0100 |
commit | e39363a9def53dd4086be107dc8b3ebca09f045d (patch) | |
tree | a2ce29eef0b7781852f5700c969b3814502c522d /net/core/netpoll.c | |
parent | ipv6: remove duplicated declaration of ip6_fragment() (diff) | |
download | linux-e39363a9def53dd4086be107dc8b3ebca09f045d.tar.xz linux-e39363a9def53dd4086be107dc8b3ebca09f045d.zip |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
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 } |