Skip to content

Commit 3d995f8

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/acpi/apei/bert.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ static int __init bert_init(void)
119119
rc = bert_check_table(bert_tab);
120120
if (rc) {
121121
pr_err(FW_BUG "table invalid.\n");
122-
return rc;
122+
goto out_put_bert_tab;
123123
}
124124

125125
region_len = bert_tab->region_length;
126126
apei_resources_init(&bert_resources);
127127
rc = apei_resources_add(&bert_resources, bert_tab->address,
128128
region_len, true);
129129
if (rc)
130-
return rc;
130+
goto out_put_bert_tab;
131131
rc = apei_resources_request(&bert_resources, "APEI BERT");
132132
if (rc)
133133
goto out_fini;
@@ -142,6 +142,8 @@ static int __init bert_init(void)
142142
apei_resources_release(&bert_resources);
143143
out_fini:
144144
apei_resources_fini(&bert_resources);
145+
out_put_bert_tab:
146+
acpi_put_table((struct acpi_table_header *)bert_tab);
145147

146148
return rc;
147149
}

0 commit comments

Comments
 (0)