ACPI: tables: FPDT: Add missing acpi_put_table() in acpi_init_fpdt()

acpi_init_fpdt() forgets to call acpi_put_table() in an error path.

Add the missing function call to fix it.

Fixes: d1eb86e59b ("ACPI: tables: introduce support for FPDT table")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Jing Xiangfeng 2021-06-02 19:58:12 +08:00 committed by Rafael J. Wysocki
parent 7ca1a8014d
commit dd9eaa23e7
1 changed files with 3 additions and 1 deletions

View File

@ -240,8 +240,10 @@ static int __init acpi_init_fpdt(void)
return 0;
fpdt_kobj = kobject_create_and_add("fpdt", acpi_kobj);
if (!fpdt_kobj)
if (!fpdt_kobj) {
acpi_put_table(header);
return -ENOMEM;
}
while (offset < header->length) {
subtable = (void *)header + offset;