acer-wmi: remove debugfs entries upon unloading
authorRuss Dill <russ.dill@gmail.com>
Tue, 2 Sep 2008 21:35:40 +0000 (14:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Sep 2008 02:21:37 +0000 (19:21 -0700)
The exit function neglects to remove debugfs entries, leading to a BUG
on reload.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/acer-wmi.c

index c6c77a505ec1e621307ded371c224094b0222b13..d8b0d326e4522232fbcc1455dce67fb3e207c059 100644 (file)
@@ -1189,7 +1189,7 @@ static int create_debugfs(void)
        return 0;
 
 error_debugfs:
-               remove_debugfs();
+       remove_debugfs();
        return -ENOMEM;
 }
 
@@ -1272,6 +1272,7 @@ error_platform_register:
 static void __exit acer_wmi_exit(void)
 {
        remove_sysfs(acer_platform_device);
+       remove_debugfs();
        platform_device_del(acer_platform_device);
        platform_driver_unregister(&acer_platform_driver);