Skip to content

Commit 43f595d

Browse files
guohanjunrafaeljw
authored andcommitted
ACPI: APEI: Put the error record serialization table for error path
The mapped error record serialization table needs to be released for error path of erst_init(). Signed-off-by: Hanjun Guo <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 541156a commit 43f595d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/acpi/apei/erst.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ static int __init erst_init(void)
11221122
rc = erst_check_table(erst_tab);
11231123
if (rc) {
11241124
pr_err(FW_BUG "ERST table is invalid.\n");
1125-
goto err;
1125+
goto err_put_erst_tab;
11261126
}
11271127

11281128
apei_resources_init(&erst_resources);
@@ -1196,6 +1196,8 @@ static int __init erst_init(void)
11961196
apei_resources_release(&erst_resources);
11971197
err_fini:
11981198
apei_resources_fini(&erst_resources);
1199+
err_put_erst_tab:
1200+
acpi_put_table((struct acpi_table_header *)erst_tab);
11991201
err:
12001202
erst_disable = 1;
12011203
return rc;

0 commit comments

Comments
 (0)