From: Jesper Juhl Date: Sat, 4 Feb 2006 19:35:59 +0000 (+0100) Subject: [PATCH] Don't check pointer for NULL before passing it to kfree [arch/powerpc/kernel... X-Git-Tag: v2.6.16-rc3~67^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95eff20feb679a2223a6da1e7f272fe9aa99591e;p=linux-2.6 [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: Jesper Juhl Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 50500093c9..aaf384c3f0 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c @@ -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); }