Skip to content

Commit

Permalink
[PATCH] Don't check pointer for NULL before passing it to kfree [arch…
Browse files Browse the repository at this point in the history
…/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>
  • Loading branch information
Jesper Juhl authored and Paul Mackerras committed Feb 7, 2006
1 parent 4009d98 commit 95eff20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/kernel/rtas_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 95eff20

Please sign in to comment.