diff options
-rw-r--r-- | drivers/acpi/tables/tbinstal.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 905dc38ab23b..18747ce8dd2f 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -110,7 +110,6 @@ acpi_status | |||
110 | acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) | 110 | acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) |
111 | { | 111 | { |
112 | u32 i; | 112 | u32 i; |
113 | u32 length; | ||
114 | acpi_status status = AE_OK; | 113 | acpi_status status = AE_OK; |
115 | 114 | ||
116 | ACPI_FUNCTION_TRACE(tb_add_table); | 115 | ACPI_FUNCTION_TRACE(tb_add_table); |
@@ -145,13 +144,18 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) | |||
145 | } | 144 | } |
146 | } | 145 | } |
147 | 146 | ||
148 | /* Check for a table match on the entire table length */ | 147 | /* |
148 | * Check for a table match on the entire table length, | ||
149 | * not just the header. | ||
150 | */ | ||
151 | if (table_desc->length != | ||
152 | acpi_gbl_root_table_list.tables[i].length) { | ||
153 | continue; | ||
154 | } | ||
149 | 155 | ||
150 | length = ACPI_MIN(table_desc->length, | ||
151 | acpi_gbl_root_table_list.tables[i].length); | ||
152 | if (ACPI_MEMCMP(table_desc->pointer, | 156 | if (ACPI_MEMCMP(table_desc->pointer, |
153 | acpi_gbl_root_table_list.tables[i].pointer, | 157 | acpi_gbl_root_table_list.tables[i].pointer, |
154 | length)) { | 158 | acpi_gbl_root_table_list.tables[i].length)) { |
155 | continue; | 159 | continue; |
156 | } | 160 | } |
157 | 161 | ||