[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 <jesper.juhl@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Jesper Juhl 2006-02-04 20:35:59 +01:00 committed by Paul Mackerras
parent 4009d98022
commit 95eff20feb
1 changed files with 1 additions and 2 deletions

View File

@ -672,8 +672,7 @@ static void rtas_flash_firmware(int reboot_type)
static void remove_flash_pde(struct proc_dir_entry *dp) static void remove_flash_pde(struct proc_dir_entry *dp)
{ {
if (dp) { if (dp) {
if (dp->data != NULL) kfree(dp->data);
kfree(dp->data);
dp->owner = NULL; dp->owner = NULL;
remove_proc_entry(dp->name, dp->parent); remove_proc_entry(dp->name, dp->parent);
} }