Skip to content

Commit

Permalink
ACPI: asus_acpi: Do not load if no device has been found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Renninger authored and Len Brown committed Jun 20, 2007
1 parent 4d2fafd commit e4d4953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ static int __init asus_acpi_init(void)
if (!asus_hotk_found) {
acpi_bus_unregister_driver(&asus_hotk_driver);
remove_proc_entry(PROC_ASUS, acpi_root_dir);
return result;
return -ENODEV;
}

asus_backlight_device = backlight_device_register("asus",NULL,NULL,
Expand Down

0 comments on commit e4d4953

Please sign in to comment.