]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ACPI: asus_acpi: Do not load if no device has been found
authorThomas Renninger <trenn@suse.de>
Thu, 8 Mar 2007 16:57:31 +0000 (17:57 +0100)
committerLen Brown <len.brown@intel.com>
Wed, 20 Jun 2007 04:33:04 +0000 (00:33 -0400)
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>
drivers/acpi/asus_acpi.c

index 6d7d4157e049f6d624069900de980629ae3ea866..45360dfab2c66b28f165a512a97ca9e9525b1bf2 100644 (file)
@@ -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,