[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <60B7663C.8070903@huawei.com>
Date: Wed, 2 Jun 2021 19:06:36 +0800
From: Jing Xiangfeng <jingxiangfeng@...wei.com>
To: Hanjun Guo <guohanjun@...wei.com>, <rjw@...ysocki.net>,
<lenb@...nel.org>, <rui.zhang@...el.com>
CC: <linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI: tables: fixes the missed acpi_put_table() in
acpi_init_fpdt()
On 2021/6/2 17:21, Hanjun Guo wrote:
> The title of this patch is misleading, how about "ACPI: FPDT: Add the
> missed acpi_put_table() in acpi_init_fpdt()" ?
Thanks a lot for your comments! I'll send a v2 with this change.
>
> On 2021/6/2 9:17, Jing Xiangfeng wrote:
>> acpi_init_fpdt() misses to call acpi_put_table() in an error path. Add
>> the missed function call to fix it.
>>
>> Fixes: d1eb86e59be0 ("ACPI: tables: introduce support for FPDT table")
>> Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
>> ---
>> drivers/acpi/acpi_fpdt.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/acpi_fpdt.c b/drivers/acpi/acpi_fpdt.c
>> index a89a806a7a2a..4ee2ad234e3d 100644
>> --- a/drivers/acpi/acpi_fpdt.c
>> +++ b/drivers/acpi/acpi_fpdt.c
>> @@ -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;
>> + }
>
> The code looks good to me.
>
> Thanks
> Hanjun
> .
>
Powered by blists - more mailing lists