Skip to contentSkip to conversation

Fix code-style warning

PATCH Applied Ola N. Kaldestad 1 participant 1 message Nov 9, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix code-style warning

Removed unnecessary else block, and removed redundant return and call to kfree in if block.

---
 kernel/sysctl.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
kernel/sysctl.c +3 -5
index d9c31bc..87fbb3e 100644
@@ -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