--- a/drivers/acpi/asus_acpi.c 2005-09-27 18:17:11.000000000 +0300 +++ b/drivers/acpi/asus_acpi.c 2005-09-27 18:30:18.000000000 +0300 @@ -990,9 +990,21 @@ static int __init asus_hotk_get_info(voi else if (bsts_result) printk(KERN_NOTICE " BSTS called, 0x%02x returned\n", bsts_result); - /* Samsung P30 has a device with a valid _HID whose INIT does not - * return anything. Catch this one and any similar here */ - if (buffer.pointer == NULL) { + /* This is unlikely with implicit return */ + if (buffer.pointer == NULL) + return -EINVAL; + + model = (union acpi_object *) buffer.pointer; + /* + * Samsung P30 has a device with a valid _HID whose INIT does not + * return anything. It used to be possible to catch this exception, + * but the implicit return code will now happily confuse the + * driver. We assume that every ACPI_TYPE_STRING is a valid model + * identifier but it's still possible to get completely bogus data. + */ + if (model->type == ACPI_TYPE_STRING) { + printk(KERN_NOTICE " %s model detected, ", model->string.pointer); + } else { if (asus_info && /* Samsung P30 */ strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) { hotk->model = P30; @@ -1007,11 +1019,6 @@ static int __init asus_hotk_get_info(voi return AE_OK; } - model = (union acpi_object *) buffer.pointer; - if (model->type == ACPI_TYPE_STRING) { - printk(KERN_NOTICE " %s model detected, ", model->string.pointer); - } - hotk->model = END_MODEL; if (strncmp(model->string.pointer, "L3D", 3) == 0) hotk->model = L3D;