]> err.no Git - linux-2.6/commitdiff
[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 04a429465665cd8ff0c377eed4d1caf0d40a4a3a..cd810f41af1a71db684a7787bde2bbc8e5d601f7 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);
 }
index 953307a9df1d852c3eac546d9e1d97e728f0df3e..a3bbc891f95997bf7e186607214aedddc7c1d454 100644 (file)
@@ -229,8 +229,7 @@ static void node_is_down(struct publication *publ)
                                     publ->node, publ->ref, publ->key);
         assert(p == publ);
        write_unlock_bh(&tipc_nametbl_lock);
-       if (publ)
-               kfree(publ);
+       kfree(publ);
 }
 
 /**