Skip to content

Commit

Permalink
netfilter: fix netfilter_net_init() return
Browse files Browse the repository at this point in the history
We accidentally return an uninitialized variable.

Fixes: cf56c2f ("netfilter: remove old pre-netns era hook api")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jul 18, 2017
1 parent 3e16afd commit 073dd5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/netfilter/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ EXPORT_SYMBOL(nf_nat_decode_session_hook);

static int __net_init netfilter_net_init(struct net *net)
{
int i, h, ret;
int i, h;

for (i = 0; i < ARRAY_SIZE(net->nf.hooks); i++) {
for (h = 0; h < NF_MAX_HOOKS; h++)
Expand All @@ -362,7 +362,7 @@ static int __net_init netfilter_net_init(struct net *net)
}
#endif

return ret;
return 0;
}

static void __net_exit netfilter_net_exit(struct net *net)
Expand Down

0 comments on commit 073dd5a

Please sign in to comment.