summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorHanjun Guo <guohanjun@huawei.com>2020-05-07 17:09:15 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-05-09 11:29:17 +0200
commit3d995f88adb106fc67efe3fd6f6dfc6b884824a9 (patch)
tree86d11622e3e29fc0a25a5487aca9dbb10c72fad3 /drivers/acpi
parentfe4e1a576ef472f32feffca208cc3409aafff244 (diff)
downloadlinux-3d995f88adb106fc67efe3fd6f6dfc6b884824a9.tar.gz
linux-3d995f88adb106fc67efe3fd6f6dfc6b884824a9.tar.bz2
linux-3d995f88adb106fc67efe3fd6f6dfc6b884824a9.zip
ACPI: APEI: Put the boot error record table after parsing
The mapped boot error record table is not used after bert_init(), release it. Signed-off-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/apei/bert.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/acpi/apei/bert.c b/drivers/acpi/apei/bert.c
index 1155fb9dcc3a..19e50fcbf4d6 100644
--- a/drivers/acpi/apei/bert.c
+++ b/drivers/acpi/apei/bert.c
@@ -119,7 +119,7 @@ static int __init bert_init(void)
rc = bert_check_table(bert_tab);
if (rc) {
pr_err(FW_BUG "table invalid.\n");
- return rc;
+ goto out_put_bert_tab;
}
region_len = bert_tab->region_length;
@@ -127,7 +127,7 @@ static int __init bert_init(void)
rc = apei_resources_add(&bert_resources, bert_tab->address,
region_len, true);
if (rc)
- return rc;
+ goto out_put_bert_tab;
rc = apei_resources_request(&bert_resources, "APEI BERT");
if (rc)
goto out_fini;
@@ -142,6 +142,8 @@ static int __init bert_init(void)
apei_resources_release(&bert_resources);
out_fini:
apei_resources_fini(&bert_resources);
+out_put_bert_tab:
+ acpi_put_table((struct acpi_table_header *)bert_tab);
return rc;
}