diff options
author | Ola N. Kaldestad <mail@okal.no> | 2017-11-17 15:30:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 16:10:03 -0800 |
commit | f9eb2fdd04d4e68fbea18970bbf65ace716d25b6 (patch) | |
tree | b1c5eddda49e62da3f7b4a1c328be5bdc3a84cc6 /kernel | |
parent | 2743232c0c4c82311718bb4ec1fb659ed64ecf7a (diff) | |
download | linux-f9eb2fdd04d4e68fbea18970bbf65ace716d25b6.tar.bz2 |
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.no
Signed-off-by: Ola N. Kaldestad <mail@okal.no>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sysctl.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index dd25d90896fc..557d46728577 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -3127,14 +3127,12 @@ int proc_do_large_bitmap(struct ctl_table *table, int write, else bitmap_copy(bitmap, tmp_bitmap, bitmap_len); } - kfree(tmp_bitmap); *lenp -= left; *ppos += *lenp; - return 0; - } else { - kfree(tmp_bitmap); - return err; } + + kfree(tmp_bitmap); + return err; } #else /* CONFIG_PROC_SYSCTL */ |