OSDN Git Service

netfilter: nfnetlink_queue: fix error return code in nfnetlink_queue_init()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 22 Mar 2013 01:28:18 +0000 (01:28 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 25 Mar 2013 13:21:27 +0000 (14:21 +0100)
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

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

index 1cb4854..42680b2 100644 (file)
@@ -1062,8 +1062,10 @@ static int __init nfnetlink_queue_init(void)
 
 #ifdef CONFIG_PROC_FS
        if (!proc_create("nfnetlink_queue", 0440,
-                        proc_net_netfilter, &nfqnl_file_ops))
+                        proc_net_netfilter, &nfqnl_file_ops)) {
+               status = -ENOMEM;
                goto cleanup_subsys;
+       }
 #endif
 
        register_netdevice_notifier(&nfqnl_dev_notifier);