mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Miaoqian Lin <linmq006@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Michal Simek <michal.simek@xilinx.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: zynq: Fix refcount leak in zynq_get_revision
Date: Wed, 29 Jun 2022 14:43:26 +0200	[thread overview]
Message-ID: <859b3e14-27ee-2dba-9876-1389927b4cb4@amd.com> (raw)
In-Reply-To: <20220605082807.21526-1-linmq006@gmail.com>



On 6/5/22 10:28, Miaoqian Lin wrote:
> of_find_compatible_node() returns a node pointer with refcount
> incremented, we should use of_node_put() on it when done.
> Add missing of_node_put() to avoid refcount leak.
> 
> Fixes: 00f7dc636366 ("ARM: zynq: Add support for SOC_BUS")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
>   arch/arm/mach-zynq/common.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
> index e1ca6a5732d2..15e8a321a713 100644
> --- a/arch/arm/mach-zynq/common.c
> +++ b/arch/arm/mach-zynq/common.c
> @@ -77,6 +77,7 @@ static int __init zynq_get_revision(void)
>   	}
>   
>   	zynq_devcfg_base = of_iomap(np, 0);
> +	of_node_put(np);
>   	if (!zynq_devcfg_base) {
>   		pr_err("%s: Unable to map I/O memory\n", __func__);
>   		return -1;

Applied.
M

      reply	other threads:[~2022-06-29 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05  8:28 Miaoqian Lin
2022-06-29 12:43 ` Michal Simek [this message]

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=859b3e14-27ee-2dba-9876-1389927b4cb4@amd.com \
    --to=michal.simek@amd.com \
    --cc=linmq006@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michal.simek@xilinx.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®