浏览代码

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 <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Zhang Rui 16 年之前
父节点
当前提交
7745384080
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/acpi/asus_acpi.c

+ 2 - 0
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;