lkml.org 
[lkml]   [2017]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Fix code-style warning
Date
Removed unnecessary else block, and removed redundant return and call to kfree in if block.

Signed-off-by: Ola N. Kaldestad <mail@okal.no>
---
kernel/sysctl.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index d9c31bc..87fbb3e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -3089,14 +3089,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 */
--
2.7.4
\
 
 \ /
  Last update: 2017-11-09 15:41    [W:0.055 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site