firmware: fix google/gsmi duplicate efivars_sysfs_init()
authorMichel Lespinasse <walken@google.com>
Tue, 28 Jan 2014 13:06:21 +0000 (05:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Feb 2014 19:29:56 +0000 (11:29 -0800)
Starting in commit e14ab23dde12b80db4c94b684a2e485b72b16af3,
efivars_sysfs_init() is called both by itself as an init function,
and by drivers/firmware/google/gsmi.c gsmi_init().

This results in runtime warnings such as the following:
[    5.651330] WARNING: at fs/sysfs/dir.c:530 sysfs_add_one+0xbd/0xe0()
[    5.657699] sysfs: cannot create duplicate filename '/firmware/gsmi/vars'

Fixing this by removing the redundant efivars_sysfs_init() call in
gsmi_init().

Tested: booted, checked that /firmware/gsmi/vars was still present and
showed the expected contents.

Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Mike Waychison <mikew@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/google/gsmi.c

index e5a67b2..f1ab05e 100644 (file)
@@ -892,13 +892,6 @@ static __init int gsmi_init(void)
                goto out_remove_sysfs_files;
        }
 
-       ret = efivars_sysfs_init();
-       if (ret) {
-               printk(KERN_INFO "gsmi: Failed to create efivars files\n");
-               efivars_unregister(&efivars);
-               goto out_remove_sysfs_files;
-       }
-
        register_reboot_notifier(&gsmi_reboot_notifier);
        register_die_notifier(&gsmi_die_notifier);
        atomic_notifier_chain_register(&panic_notifier_list,