Skip to content

Commit 11c7bdf

Browse files
guohanjunrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 43f595d commit 11c7bdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/acpi/apei/hest.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ void __init acpi_hest_init(void)
243243
} else if (ACPI_FAILURE(status)) {
244244
const char *msg = acpi_format_exception(status);
245245
pr_err(HEST_PFX "Failed to get table, %s\n", msg);
246-
rc = -EINVAL;
247-
goto err;
246+
hest_disable = HEST_DISABLED;
247+
return;
248248
}
249249

250250
rc = apei_hest_parse(hest_parse_cmc, NULL);
@@ -266,4 +266,5 @@ void __init acpi_hest_init(void)
266266
return;
267267
err:
268268
hest_disable = HEST_DISABLED;
269+
acpi_put_table((struct acpi_table_header *)hest_tab);
269270
}

0 commit comments

Comments
 (0)