Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
[linux-drm-fsl-dcu.git] / drivers / firmware / efi / efi.c
index ca617f40574ac2bb8e5697b858a1c52f93c8fad9..9fa8084a7c8d7d9e5aff23bdd372af512e39047a 100644 (file)
@@ -66,7 +66,6 @@ static int __init parse_efi_cmdline(char *str)
 early_param("efi", parse_efi_cmdline);
 
 struct kobject *efi_kobj;
-static struct kobject *efivars_kobj;
 
 /*
  * Let's not leave out systab information that snuck into
@@ -218,10 +217,9 @@ static int __init efisubsys_init(void)
                goto err_remove_group;
 
        /* and the standard mountpoint for efivarfs */
-       efivars_kobj = kobject_create_and_add("efivars", efi_kobj);
-       if (!efivars_kobj) {
+       error = sysfs_create_mount_point(efi_kobj, "efivars");
+       if (error) {
                pr_err("efivars: Subsystem registration failed.\n");
-               error = -ENOMEM;
                goto err_remove_group;
        }