Commit 073dd5ad authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

netfilter: fix netfilter_net_init() return

We accidentally return an uninitialized variable.

Fixes: cf56c2f8 ("netfilter: remove old pre-netns era hook api")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3e16afd3
......@@ -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++)
......@@ -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)
......
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