aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efivars.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 7f9f086106cc..b61a72fb6219 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -617,16 +617,16 @@ efivar_create_sysfs_entry(unsigned long variable_name_size,
617 *(short_name + strlen(short_name)) = '-'; 617 *(short_name + strlen(short_name)) = '-';
618 efi_guid_unparse(vendor_guid, short_name + strlen(short_name)); 618 efi_guid_unparse(vendor_guid, short_name + strlen(short_name));
619 619
620 kobject_set_name(&new_efivar->kobj, "%s", short_name);
621 new_efivar->kobj.kset = vars_kset; 620 new_efivar->kobj.kset = vars_kset;
622 new_efivar->kobj.ktype = &efivar_ktype; 621 i = kobject_init_and_add(&new_efivar->kobj, &efivar_ktype, NULL,
623 i = kobject_register(&new_efivar->kobj); 622 "%s", short_name);
624 if (i) { 623 if (i) {
625 kfree(short_name); 624 kfree(short_name);
626 kfree(new_efivar); 625 kfree(new_efivar);
627 return 1; 626 return 1;
628 } 627 }
629 628
629 kobject_uevent(&new_efivar->kobj, KOBJ_ADD);
630 kfree(short_name); 630 kfree(short_name);
631 short_name = NULL; 631 short_name = NULL;
632 632