sparc64: Remove redundant NULL checks before kfree
PATCH 1/1 sparc64: Remove redundant NULL checks before kfree
From: Minghao Chi <[email protected]>
Checking a pointer for NULL before calling kfree() on it is redundant, kfree() deals with NULL pointers just fine.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
--- arch/sparc/kernel/cpumap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
arch/sparc/kernel/cpumap.c +2 -4
@@ -352,10 +352,8 @@ static void _cpu_map_rebuild(void) {int i; -if (cpuinfo_tree) { -kfree (cpuinfo_tree); - cpuinfo_tree =NULL ; - } +kfree (cpuinfo_tree); + cpuinfo_tree =NULL ; cpuinfo_tree =build_cpuinfo_tree ();if (!cpuinfo_tree)
Signature · 1 line
2.25.1