netfilter: fix netfilter_net_init() return

We accidentally return an uninitialized variable.

Fixes: cf56c2f892 ("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>
This commit is contained in:
Dan Carpenter 2017-07-18 22:38:56 +03:00 committed by David S. Miller
parent 3e16afd33f
commit 073dd5ad34

View file

@ -344,7 +344,7 @@ EXPORT_SYMBOL(nf_nat_decode_session_hook);
static int __net_init netfilter_net_init(struct net *net) 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 (i = 0; i < ARRAY_SIZE(net->nf.hooks); i++) {
for (h = 0; h < NF_MAX_HOOKS; h++) for (h = 0; h < NF_MAX_HOOKS; h++)
@ -362,7 +362,7 @@ static int __net_init netfilter_net_init(struct net *net)
} }
#endif #endif
return ret; return 0;
} }
static void __net_exit netfilter_net_exit(struct net *net) static void __net_exit netfilter_net_exit(struct net *net)