From: Jesper Juhl Redundant NULL check before kfree removal from net/ Signed-off-by: Jesper Juhl Acked-by: James Morris Signed-off-by: Andrew Morton --- net/ipv4/ipcomp.c | 7 ++----- net/tipc/name_distr.c | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff -puN net/ipv4/ipcomp.c~remove-redundant-null-checks-before-free-in-net net/ipv4/ipcomp.c --- devel/net/ipv4/ipcomp.c~remove-redundant-null-checks-before-free-in-net 2006-04-17 21:28:12.000000000 -0700 +++ devel-akpm/net/ipv4/ipcomp.c 2006-04-17 21:28:12.000000000 -0700 @@ -290,11 +290,8 @@ static void ipcomp_free_scratches(void) if (!scratches) return; - for_each_possible_cpu(i) { - void *scratch = *per_cpu_ptr(scratches, i); - if (scratch) - vfree(scratch); - } + for_each_possible_cpu(i) + vfree(*per_cpu_ptr(scratches, i)); free_percpu(scratches); } diff -puN net/tipc/name_distr.c~remove-redundant-null-checks-before-free-in-net net/tipc/name_distr.c --- devel/net/tipc/name_distr.c~remove-redundant-null-checks-before-free-in-net 2006-04-17 21:28:12.000000000 -0700 +++ devel-akpm/net/tipc/name_distr.c 2006-04-17 21:28:12.000000000 -0700 @@ -229,8 +229,7 @@ static void node_is_down(struct publicat publ->node, publ->ref, publ->key); assert(p == publ); write_unlock_bh(&tipc_nametbl_lock); - if (publ) - kfree(publ); + kfree(publ); } /** _