Skip to content

Commit

Permalink
ACPI: APEI: Put the HEST table for error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hanjun Guo authored and Rafael J. Wysocki committed May 9, 2020
1 parent 43f595d commit 11c7bdf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/acpi/apei/hest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

0 comments on commit 11c7bdf

Please sign in to comment.