Commit dd9eaa23 authored by Jing Xiangfeng's avatar Jing Xiangfeng Committed by Rafael J. Wysocki

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: d1eb86e5 ("ACPI: tables: introduce support for FPDT table")
Signed-off-by: default avatarJing Xiangfeng <jingxiangfeng@huawei.com>
Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 7ca1a801
...@@ -240,8 +240,10 @@ static int __init acpi_init_fpdt(void) ...@@ -240,8 +240,10 @@ static int __init acpi_init_fpdt(void)
return 0; return 0;
fpdt_kobj = kobject_create_and_add("fpdt", acpi_kobj); fpdt_kobj = kobject_create_and_add("fpdt", acpi_kobj);
if (!fpdt_kobj) if (!fpdt_kobj) {
acpi_put_table(header);
return -ENOMEM; return -ENOMEM;
}
while (offset < header->length) { while (offset < header->length) {
subtable = (void *)header + offset; subtable = (void *)header + offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment