]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
don't load asus-acpi if model is not supported
authorZhang Rui <rui.zhang@intel.com>
Fri, 17 Oct 2008 05:42:41 +0000 (01:42 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Feb 2009 22:00:44 +0000 (14:00 -0800)
commit 7745384080ef70f7710530afa3e45477b126e056 upstream.

asus_hotk_get_info should return -ENODEV if the model is not supported.
http://bugzilla.kernel.org/show_bug.cgi?id=10389

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/asus_acpi.c

index 4434209e453e523299092cd9b62950a3f8c8881f..e2ab023ef2237f4438d4c8fc59f0ed33fa3873c1 100644 (file)
@@ -1244,6 +1244,8 @@ static int asus_hotk_get_info(void)
                               "default values\n", string);
                        printk(KERN_NOTICE
                               "  send /proc/acpi/dsdt to the developers\n");
+                       kfree(model);
+                       return -ENODEV;
                }
                hotk->methods = &model_conf[hotk->model];
                return AE_OK;