Skip to content

Commit

Permalink
[PATCH] firmware/efivars: handle error
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Garzik authored and Linus Torvalds committed Oct 11, 2006
1 parent 42ddfd6 commit 69b2186
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/firmware/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,12 @@ efivar_create_sysfs_entry(unsigned long variable_name_size,

kobject_set_name(&new_efivar->kobj, "%s", short_name);
kobj_set_kset_s(new_efivar, vars_subsys);
kobject_register(&new_efivar->kobj);
i = kobject_register(&new_efivar->kobj);
if (i) {
kfree(short_name);
kfree(new_efivar);
return 1;
}

kfree(short_name);
short_name = NULL;
Expand Down

0 comments on commit 69b2186

Please sign in to comment.