diff options
author | Thomas Renninger <trenn@suse.de> | 2007-03-08 11:57:31 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-06-20 00:33:04 -0400 |
commit | e4d49531dcc2f334205d99614164ea900216b1cb (patch) | |
tree | 7c923e32a7d41413b0d081aa80cd3680b4ad1dee /drivers/acpi | |
parent | 4d2fafd17a325b3f4f5f9edb1211bc7f4c311269 (diff) |
ACPI: asus_acpi: Do not load if no device has been found
asus_acpi_init() has a hack to prevent the driver from loading
when asus_hotk_add() fails. However, it was returning the successful
return value of acpi_bug_registger_driver() on failure. This caused
an oops on unload. Instead it should return -ENODEV.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/asus_acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 6d7d4157e049..45360dfab2c6 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -1398,7 +1398,7 @@ static int __init asus_acpi_init(void) | |||
1398 | if (!asus_hotk_found) { | 1398 | if (!asus_hotk_found) { |
1399 | acpi_bus_unregister_driver(&asus_hotk_driver); | 1399 | acpi_bus_unregister_driver(&asus_hotk_driver); |
1400 | remove_proc_entry(PROC_ASUS, acpi_root_dir); | 1400 | remove_proc_entry(PROC_ASUS, acpi_root_dir); |
1401 | return result; | 1401 | return -ENODEV; |
1402 | } | 1402 | } |
1403 | 1403 | ||
1404 | asus_backlight_device = backlight_device_register("asus",NULL,NULL, | 1404 | asus_backlight_device = backlight_device_register("asus",NULL,NULL, |