aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efivars.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-10-11 04:22:23 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:25 -0400
commit69b2186c5fcb335e29c558e3b4e410e1939b5cc8 (patch)
treea7579c6e5c81c74255dacf65eaff383d71ad37eb /drivers/firmware/efivars.c
parent42ddfd6859b9d57490c94d26e29a43ffd78366e5 (diff)
[PATCH] firmware/efivars: handle error
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>
Diffstat (limited to 'drivers/firmware/efivars.c')
-rw-r--r--drivers/firmware/efivars.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 8ebce1c03ad7..5ab5e393b882 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -639,7 +639,12 @@ efivar_create_sysfs_entry(unsigned long variable_name_size,
639 639
640 kobject_set_name(&new_efivar->kobj, "%s", short_name); 640 kobject_set_name(&new_efivar->kobj, "%s", short_name);
641 kobj_set_kset_s(new_efivar, vars_subsys); 641 kobj_set_kset_s(new_efivar, vars_subsys);
642 kobject_register(&new_efivar->kobj); 642 i = kobject_register(&new_efivar->kobj);
643 if (i) {
644 kfree(short_name);
645 kfree(new_efivar);
646 return 1;
647 }
643 648
644 kfree(short_name); 649 kfree(short_name);
645 short_name = NULL; 650 short_name = NULL;