Commit 4eb8320b authored by Ard Biesheuvel's avatar Ard Biesheuvel

efi: Move arch_tables check to caller

Instead of making match_config_table() test its table_types pointer for
NULL-ness, omit the call entirely if no arch_tables pointer was provided
to efi_config_parse_tables().
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent 4e9a0f73
...@@ -525,15 +525,13 @@ static __init int match_config_table(const efi_guid_t *guid, ...@@ -525,15 +525,13 @@ static __init int match_config_table(const efi_guid_t *guid,
{ {
int i; int i;
if (table_types) { for (i = 0; efi_guidcmp(table_types[i].guid, NULL_GUID); i++) {
for (i = 0; efi_guidcmp(table_types[i].guid, NULL_GUID); i++) { if (!efi_guidcmp(*guid, table_types[i].guid)) {
if (!efi_guidcmp(*guid, table_types[i].guid)) { *(table_types[i].ptr) = table;
*(table_types[i].ptr) = table; if (table_types[i].name[0])
if (table_types[i].name[0]) pr_cont("%s=0x%lx ",
pr_cont(" %s=0x%lx ", table_types[i].name, table);
table_types[i].name, table); return 1;
return 1;
}
} }
} }
...@@ -570,7 +568,7 @@ int __init efi_config_parse_tables(const efi_config_table_t *config_tables, ...@@ -570,7 +568,7 @@ int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
table = tbl32[i].table; table = tbl32[i].table;
} }
if (!match_config_table(guid, table, common_tables)) if (!match_config_table(guid, table, common_tables) && arch_tables)
match_config_table(guid, table, arch_tables); match_config_table(guid, table, arch_tables);
} }
pr_cont("\n"); pr_cont("\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment