Commit 39dbbb45 authored by Russ Dill's avatar Russ Dill Committed by Linus Torvalds

acer-wmi: remove debugfs entries upon unloading

The exit function neglects to remove debugfs entries, leading to a BUG
on reload.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: default avatarRuss Dill <Russ.Dill@gmail.com>
Acked-by: default avatarCarlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6ccfa806
...@@ -1189,7 +1189,7 @@ static int create_debugfs(void) ...@@ -1189,7 +1189,7 @@ static int create_debugfs(void)
return 0; return 0;
error_debugfs: error_debugfs:
remove_debugfs(); remove_debugfs();
return -ENOMEM; return -ENOMEM;
} }
...@@ -1272,6 +1272,7 @@ static int __init acer_wmi_init(void) ...@@ -1272,6 +1272,7 @@ static int __init acer_wmi_init(void)
static void __exit acer_wmi_exit(void) static void __exit acer_wmi_exit(void)
{ {
remove_sysfs(acer_platform_device); remove_sysfs(acer_platform_device);
remove_debugfs();
platform_device_del(acer_platform_device); platform_device_del(acer_platform_device);
platform_driver_unregister(&acer_platform_driver); platform_driver_unregister(&acer_platform_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment