summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-07-18 22:38:56 +0300
committerDavid S. Miller <davem@davemloft.net>2017-07-19 00:50:28 +0300
commit073dd5ad34b1d3aaadaa7e5e8cbe576d9545f163 (patch)
treea37a3669f44135c665e27791a54db759fada9d56 /net
parent3e16afd33f8fdad0a39586d670ade3cad67e1360 (diff)
downloadlinux-073dd5ad34b1d3aaadaa7e5e8cbe576d9545f163.tar.xz
netfilter: fix netfilter_net_init() return
We accidentally return an uninitialized variable. Fixes: cf56c2f892a8 ("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>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 368610dbc3c0..974cf2a3795a 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -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)