Skip to content

Commit dd9eaa2

Browse files
hiss2018rafaeljw
authored andcommitted
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: d1eb86e ("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>
1 parent 7ca1a80 commit dd9eaa2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/acpi/acpi_fpdt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,10 @@ static int __init acpi_init_fpdt(void)
240240
return 0;
241241

242242
fpdt_kobj = kobject_create_and_add("fpdt", acpi_kobj);
243-
if (!fpdt_kobj)
243+
if (!fpdt_kobj) {
244+
acpi_put_table(header);
244245
return -ENOMEM;
246+
}
245247

246248
while (offset < header->length) {
247249
subtable = (void *)header + offset;

0 commit comments

Comments
 (0)