提交 63903ca6 编写于 作者: J Jesper Juhl 提交者: David S. Miller

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

Redundant NULL check before kfree removal
from net/
Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
Acked-by: NJames Morris <jmorris@namei.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册