Skip to content

Commit

Permalink
ACPI: APEI: Put the error record serialization table for error path
Browse files Browse the repository at this point in the history
The mapped error record serialization table needs to be
released for error path of erst_init().

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 541156a commit 43f595d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/acpi/apei/erst.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ static int __init erst_init(void)
rc = erst_check_table(erst_tab);
if (rc) {
pr_err(FW_BUG "ERST table is invalid.\n");
goto err;
goto err_put_erst_tab;
}

apei_resources_init(&erst_resources);
Expand Down Expand Up @@ -1196,6 +1196,8 @@ static int __init erst_init(void)
apei_resources_release(&erst_resources);
err_fini:
apei_resources_fini(&erst_resources);
err_put_erst_tab:
acpi_put_table((struct acpi_table_header *)erst_tab);
err:
erst_disable = 1;
return rc;
Expand Down

0 comments on commit 43f595d

Please sign in to comment.