Skip to content

Commit

Permalink
netpoll: fix an uninitialized variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cong Wang authored and David S. Miller committed Jan 23, 2013
1 parent 9647bb8 commit e39363a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e39363a

Please sign in to comment.