Commit 63903ca6 authored by Jesper Juhl's avatar Jesper Juhl Committed by David S. Miller

[NET]: Remove redundant NULL checks before [kv]free

Redundant NULL check before kfree removal
from net/
Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
Acked-by: default avatarJames Morris <jmorris@namei.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 40daafc8
......@@ -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);
}
......
......@@ -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);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment