[NET]: Remove redundant NULL checks before [kv]free
authorJesper Juhl <jesper.juhl@gmail.com>
Tue, 18 Apr 2006 21:51:44 +0000 (14:51 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 18 Apr 2006 22:57:55 +0000 (15:57 -0700)
Redundant NULL check before kfree removal
from net/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipcomp.c
net/tipc/name_distr.c

index 04a4294..cd810f4 100644 (file)
@@ -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);
 }
Simple merge