From ed2848febe13670261e2cfa3e4a5b14e54427b7e Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Fri, 4 Jul 2008 10:57:51 +0800 Subject: [PATCH] --- yaml --- r: 117293 b: refs/heads/master c: a6f30539f31a8129288b0e5640d3eb1174848c15 h: refs/heads/master i: 117291: 8c2f0bff4c3b7921b5bbd15084ad11792f9b039b v: v3 --- [refs] | 2 +- trunk/drivers/acpi/tables/tbinstal.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 0bdcf8954851..807df44eaa35 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9db4fcd99f7ef886ded97cd26a8642c70fbe34df +refs/heads/master: a6f30539f31a8129288b0e5640d3eb1174848c15 diff --git a/trunk/drivers/acpi/tables/tbinstal.c b/trunk/drivers/acpi/tables/tbinstal.c index 905dc38ab23b..18747ce8dd2f 100644 --- a/trunk/drivers/acpi/tables/tbinstal.c +++ b/trunk/drivers/acpi/tables/tbinstal.c @@ -110,7 +110,6 @@ acpi_status acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) { u32 i; - u32 length; acpi_status status = AE_OK; ACPI_FUNCTION_TRACE(tb_add_table); @@ -145,13 +144,18 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) } } - /* Check for a table match on the entire table length */ + /* + * Check for a table match on the entire table length, + * not just the header. + */ + if (table_desc->length != + acpi_gbl_root_table_list.tables[i].length) { + continue; + } - length = ACPI_MIN(table_desc->length, - acpi_gbl_root_table_list.tables[i].length); if (ACPI_MEMCMP(table_desc->pointer, acpi_gbl_root_table_list.tables[i].pointer, - length)) { + acpi_gbl_root_table_list.tables[i].length)) { continue; }