Commit 9d53e4dd authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Fix return value when proc file creation fails in ip_conntrack

We notiecd proc_net_fops_create() failing, and cleaned up, but returned
0 anyway.

Found by the --failtest flag to nfsim-testsuite.  --failtest rocks my
world.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d6b59525
...@@ -741,6 +741,7 @@ static int init_or_cleanup(int init) ...@@ -741,6 +741,7 @@ static int init_or_cleanup(int init)
goto cleanup_nothing; goto cleanup_nothing;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
ret = -ENOMEM;
proc = proc_net_fops_create("ip_conntrack", 0440, &ct_file_ops); proc = proc_net_fops_create("ip_conntrack", 0440, &ct_file_ops);
if (!proc) goto cleanup_init; if (!proc) goto cleanup_init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment