Commit e39363a9 authored by Cong Wang's avatar Cong Wang Committed by David S. Miller

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: default avatarFengguang Wu <fengguang.wu@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <amwang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9647bb80
...@@ -1140,6 +1140,7 @@ int netpoll_setup(struct netpoll *np) ...@@ -1140,6 +1140,7 @@ int netpoll_setup(struct netpoll *np)
#else #else
np_err(np, "IPv6 is not supported %s, aborting\n", np_err(np, "IPv6 is not supported %s, aborting\n",
np->dev_name); np->dev_name);
err = -EINVAL;
goto put; goto put;
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment