diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2006-02-04 14:35:59 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-07 05:51:53 -0500 |
commit | 95eff20feb679a2223a6da1e7f272fe9aa99591e (patch) | |
tree | 1a4e2a5d8c5d8a4f8511e491705e2e220065ce5d /arch/powerpc | |
parent | 4009d980224389c33dce1565e0ac9f673354c43f (diff) |
[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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/rtas_flash.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 50500093c97f..aaf384c3f04a 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) | |||
672 | static void remove_flash_pde(struct proc_dir_entry *dp) | 672 | static void remove_flash_pde(struct proc_dir_entry *dp) |
673 | { | 673 | { |
674 | if (dp) { | 674 | if (dp) { |
675 | if (dp->data != NULL) | 675 | kfree(dp->data); |
676 | kfree(dp->data); | ||
677 | dp->owner = NULL; | 676 | dp->owner = NULL; |
678 | remove_proc_entry(dp->name, dp->parent); | 677 | remove_proc_entry(dp->name, dp->parent); |
679 | } | 678 | } |