提交 95eff20f 编写于 作者: J Jesper Juhl 提交者: Paul Mackerras

[PATCH] Don't check pointer for NULL before passing it to kfree [arch/powerpc/kernel/rtas_flash.c]

Checking a pointer for NULL before passing it to kfree is pointless, kfree
does its own NULL checking of input.
Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 4009d980
......@@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type)
static void remove_flash_pde(struct proc_dir_entry *dp)
{
if (dp) {
if (dp->data != NULL)
kfree(dp->data);
kfree(dp->data);
dp->owner = NULL;
remove_proc_entry(dp->name, dp->parent);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册