netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] netfilter: nfnetlink_queue: fix error return code in nfnetlink_queue_init()
@ 2013-03-22 11:28 Wei Yongjun
  2013-03-25 19:32 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-03-22 11:28 UTC (permalink / raw)
  To: pablo, kaber; +Cc: yongjun_wei, netfilter-devel, netfilter, coreteam

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 net/netfilter/nfnetlink_queue_core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
index 1cb4854..42680b2 100644
--- a/net/netfilter/nfnetlink_queue_core.c
+++ b/net/netfilter/nfnetlink_queue_core.c
@@ -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);



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-25 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 11:28 [PATCH -next] netfilter: nfnetlink_queue: fix error return code in nfnetlink_queue_init() Wei Yongjun
2013-03-25 19:32 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).