Commit 2ecc3c9d authored by Len Brown's avatar Len Brown Committed by Len Brown

[ACPI4ASUS] acpi_bus_register_driver() return code

Signed-off-by: default avatarKarol Kozimor <sziwan@hell.org.pl>
parent c5e5237e
......@@ -1210,20 +1210,24 @@ static int __init asus_acpi_init(void)
{
int result;
if (acpi_disabled)
return -ENODEV;
asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
if (!asus_proc_dir) {
printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
return(-ENODEV);
return -ENODEV;
}
asus_proc_dir->owner = THIS_MODULE;
result = acpi_bus_register_driver(&asus_hotk_driver);
if (result < 0) {
if (result < 1) {
acpi_bus_unregister_driver(&asus_hotk_driver);
remove_proc_entry(PROC_ASUS, acpi_root_dir);
return(-ENODEV);
return -ENODEV;
}
return(0);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment