提交 e4d49531 编写于 作者: T Thomas Renninger 提交者: Len Brown

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: NThomas Renninger <trenn@suse.de>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 4d2fafd1
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册