Don't check pointer for NULL before passing it to kfree [arch/powerpc/kernel/rtas_flash.c]
PATCH 1/1 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 <[email protected]>
---
arch/powerpc/kernel/rtas_flash.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/kernel/rtas_flash.c +1 -2
@@ -672,8 +672,7 @@ static void rtas_flash_firmware(int rebostatic 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); }