netfilter: nf_conntrack: fix error return code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 27 Mar 2013 03:57:10 +0000 (03:57 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 27 Mar 2013 17:31:17 +0000 (18:31 +0100)
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in function
nf_conntrack_standalone_init().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_standalone.c

index 6bcce401fd1c5ddfbc3fe00bb45ab87a72ab9fb2..fedee394366187cf35bfa242c9cd1584f0eb0108 100644 (file)
@@ -568,6 +568,7 @@ static int __init nf_conntrack_standalone_init(void)
                register_net_sysctl(&init_net, "net", nf_ct_netfilter_table);
        if (!nf_ct_netfilter_header) {
                pr_err("nf_conntrack: can't register to sysctl.\n");
+               ret = -ENOMEM;
                goto out_sysctl;
        }
 #endif