Commit 0933ad9c authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

[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: default avatarJesper Juhl <>
Acked-by: default avatarMatt Domsch <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 0159f76d
......@@ -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);
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);
kfree(short_name); short_name = NULL;
short_name = NULL;
list_add(&new_efivar->list, &efivar_list);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment