Commit f9eb2fdd authored by Ola N. Kaldestad's avatar Ola N. Kaldestad Committed by Linus Torvalds

kernel/sysctl.c: code cleanups

Remove unnecessary else block, remove redundant return and call to kfree
in if block.

Link: http://lkml.kernel.org/r/1510238435-1655-1-git-send-email-mail@okal.noSigned-off-by: default avatarOla N. Kaldestad <mail@okal.no>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2743232c
...@@ -3127,14 +3127,12 @@ int proc_do_large_bitmap(struct ctl_table *table, int write, ...@@ -3127,14 +3127,12 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
else else
bitmap_copy(bitmap, tmp_bitmap, bitmap_len); bitmap_copy(bitmap, tmp_bitmap, bitmap_len);
} }
kfree(tmp_bitmap);
*lenp -= left; *lenp -= left;
*ppos += *lenp; *ppos += *lenp;
return 0;
} else {
kfree(tmp_bitmap);
return err;
} }
kfree(tmp_bitmap);
return err;
} }
#else /* CONFIG_PROC_SYSCTL */ #else /* CONFIG_PROC_SYSCTL */
......
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