diff options
author | Hanjun Guo <guohanjun@huawei.com> | 2020-05-07 17:09:18 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-05-09 11:29:17 +0200 |
commit | 11c7bdffc7433090d3692bb99efcc580405ccac8 (patch) | |
tree | 79078a1b86e258f4cccf08dfa651ecd702d99a24 | |
parent | 43f595dcab30a654dc9fc643e017615e358c2c1b (diff) |
ACPI: APEI: Put the HEST table for error path
hest_tab will be used after hest_init(), but we need to release
it for error path.
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/apei/hest.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 822402480f7d..953a2fae8b15 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -243,8 +243,8 @@ void __init acpi_hest_init(void) } else if (ACPI_FAILURE(status)) { const char *msg = acpi_format_exception(status); pr_err(HEST_PFX "Failed to get table, %s\n", msg); - rc = -EINVAL; - goto err; + hest_disable = HEST_DISABLED; + return; } rc = apei_hest_parse(hest_parse_cmc, NULL); @@ -266,4 +266,5 @@ void __init acpi_hest_init(void) return; err: hest_disable = HEST_DISABLED; + acpi_put_table((struct acpi_table_header *)hest_tab); } |