All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>,
	rjw@rjwysocki.net, lenb@kernel.org
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, 02 Jun 2021 15:28:02 +0800	[thread overview]
Message-ID: <ede3060df241fa00e0ea994006af206e8bc8e6ec.camel@intel.com> (raw)
In-Reply-To: <20210602011723.23666-1-jingxiangfeng@huawei.com>

Hi, Xiangfeng,

thanks for the patch.

On Wed, 2021-06-02 at 09:17 +0800, 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>

thanks,
rui
> ---
>  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;


  reply	other threads:[~2021-06-02  7:28 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 [this message]
2021-06-02  9:21 ` Hanjun Guo
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=ede3060df241fa00e0ea994006af206e8bc8e6ec.camel@intel.com \
    --to=rui.zhang@intel.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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.