diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-06-25 23:59:15 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-26 01:25:06 +0200 |
commit | 0933ad9c233b09ee5fd636525ed07c149c879980 (patch) | |
tree | 9231b10b61f358f00f27bc3d40936b5a286bcfa4 /drivers/firmware | |
parent | [PATCH] kfree cleanups in ixj.c (diff) | |
download | linux-0933ad9c233b09ee5fd636525ed07c149c879980.tar.xz linux-0933ad9c233b09ee5fd636525ed07c149c879980.zip |
[PATCH] kfree cleanups for drivers/firmware/
Here's a patch with kfree() cleanups for drivers/firmware/efivars.c Patch
removes redundant NULL checks before kfree and also makes a small
whitespace cleanup - moves two statements on same line to separate lines.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efivars.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index a3451cb94004..33b17c6a46fb 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -618,8 +618,8 @@ efivar_create_sysfs_entry(unsigned long variable_name_size, new_efivar = kmalloc(sizeof(struct efivar_entry), GFP_KERNEL); if (!short_name || !new_efivar) { - if (short_name) kfree(short_name); - if (new_efivar) kfree(new_efivar); + kfree(short_name); + kfree(new_efivar); return 1; } memset(short_name, 0, short_name_size+1); @@ -644,7 +644,8 @@ efivar_create_sysfs_entry(unsigned long variable_name_size, kobj_set_kset_s(new_efivar, vars_subsys); kobject_register(&new_efivar->kobj); - kfree(short_name); short_name = NULL; + kfree(short_name); + short_name = NULL; spin_lock(&efivars_lock); list_add(&new_efivar->list, &efivar_list); |