Skip to content

Commit

Permalink
firmware: fix google/gsmi duplicate efivars_sysfs_init()
Browse files Browse the repository at this point in the history
Starting in commit e14ab23,
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 <[email protected]>
Acked-by: Matt Fleming <[email protected]>
Acked-by: Mike Waychison <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
walken-google authored and gregkh committed Feb 15, 2014
1 parent 4272b96 commit b12b73f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/firmware/google/gsmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b12b73f

Please sign in to comment.