From: Hanjun Guo <guohanjun@huawei.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>, <rjw@rjwysocki.net>,
<lenb@kernel.org>, <rui.zhang@intel.com>
Cc: <linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI: tables: fixes the missed acpi_put_table() in acpi_init_fpdt()
Date: Wed, 2 Jun 2021 17:21:38 +0800 [thread overview]
Message-ID: <b70f1c51-08fa-4ddf-51c6-77064e02fe87@huawei.com> (raw)
In-Reply-To: <20210602011723.23666-1-jingxiangfeng@huawei.com>
The title of this patch is misleading, how about "ACPI: FPDT: Add the
missed acpi_put_table() in acpi_init_fpdt()" ?
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@huawei.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
next prev parent reply other threads:[~2021-06-02 9:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 1:17 [PATCH] ACPI: tables: fixes the missed acpi_put_table() in acpi_init_fpdt() Jing Xiangfeng
2021-06-02 7:28 ` Zhang Rui
2021-06-02 9:21 ` Hanjun Guo [this message]
2021-06-02 11:06 ` Jing Xiangfeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b70f1c51-08fa-4ddf-51c6-77064e02fe87@huawei.com \
--to=guohanjun@huawei.com \
--cc=jingxiangfeng@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox