Files
linux/drivers/acpi
Maxime Austruy 5ebffd7c05 asus_acpi: fix oops on non-asus machines
If asus_acpi_init doesn't find any device it knows about, it mistakenly
returns a "success" error code even though it cleans up after itself.  Later
when trying to rmmod asus_acpi, the module_exit routine would try to clean up
one more time and we would end up calling
acpi_bus_unregister_driver(&asus_hotk_driver) twice.  This patch addresses
this first problem by returning -ENODEV when no appropriate device is found.

Then there was also another bug with the code handling the return value of
backlight_device_register.  If this function ever failed, the driver would
cleanup by calling the module_exit routine from module_init, but it would
still return "success".  So any attempt to rmmod this module would result in
asus_acpi_exit being called twice but it's not ready to handle it (I haven't
hit this bug, just found it by code inspection).  This patch fixes that by
inserting a return -ENODEV; at the end of this error handling path.

Signed-off-by: Maxime Austruy <maxime@tralhalla.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-01 12:29:44 -07:00
..
2007-05-09 23:34:35 -04:00
2007-05-09 23:34:35 -04:00
2007-05-09 23:34:35 -04:00
2007-05-09 23:34:35 -04:00
2007-05-09 23:34:35 -04:00
2007-05-09 23:34:35 -04:00
2007-05-09 23:34:35 -04:00
2007-05-09 23:34:35 -04:00
2007-05-29 18:29:50 -04:00
2007-02-16 22:10:32 -05:00
2007-03-09 21:19:05 -05:00
2007-02-12 22:42:12 -05:00
2007-02-12 22:42:12 -05:00
2007-03-28 23:31:43 -04:00
2007-02-12 22:42:12 -05:00
2007-05-08 11:15:18 -07:00
2007-04-28 23:16:59 -04:00
2007-04-28 23:16:59 -04:00
2007-05-08 11:15:08 -07:00
2007-02-12 22:42:12 -05:00