]> git.hungrycats.org Git - linux/commitdiff
[ACPI4ASUS] acpi_bus_register_driver() return code
authorLen Brown <len.brown@intel.com>
Fri, 8 Oct 2004 20:22:10 +0000 (16:22 -0400)
committerLen Brown <lenb@dhcppc3.>
Fri, 8 Oct 2004 20:22:10 +0000 (16:22 -0400)
Signed-off-by: Karol Kozimor <sziwan@hell.org.pl>
drivers/acpi/asus_acpi.c

index ba34691a37340b4feef9e26463f304b159658b31..853559dac119a4a24590bb1840a1fc244b1b8a1f 100644 (file)
@@ -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;
 }