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 v2] ACPI: FPDT: Add the missed acpi_put_table() in acpi_init_fpdt()
Date: Thu, 3 Jun 2021 09:02:01 +0800 [thread overview]
Message-ID: <bef2506e-7f65-199d-92b4-45314701523d@huawei.com> (raw)
In-Reply-To: <20210602115812.109900-1-jingxiangfeng@huawei.com>
On 2021/6/2 19:58, 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>
> Acked-by: Zhang Rui <rui.zhang@intel.com>
> ---
> v1 -> v2:
> - Collect Acked-by tag by Zhang Rui.
> - retitle the subject as suggested by Hanjun Guo.
> ---
> 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;
> + }
>
> while (offset < header->length) {
> subtable = (void *)header + offset;
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
next prev parent reply other threads:[~2021-06-03 1:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 11:58 Jing Xiangfeng
2021-06-03 1:02 ` Hanjun Guo [this message]
2021-06-07 13:59 ` Rafael J. Wysocki
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=bef2506e-7f65-199d-92b4-45314701523d@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
all inboxes | Powered by JetHome®