From: Zhang Rui Date: Fri, 17 Oct 2008 05:42:41 +0000 (-0400) Subject: don't load asus-acpi if model is not supported X-Git-Tag: v2.6.28-rc1~26^2~14^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7745384080ef70f7710530afa3e45477b126e056;p=linux-2.6-omap-h63xx.git don't load asus-acpi if model is not supported 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 Signed-off-by: Len Brown --- diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 91571fc0f17..428e47b1ca6 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c @@ -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;