mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: cgel.zte@gmail.com
Cc: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Lv Ruyi <lv.ruyi@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>, Rob Herring <robh@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH] ARM: highbank: Fix missing of_node_put in highbank_init()
Date: Wed, 20 Apr 2022 15:26:17 +0100	[thread overview]
Message-ID: <20220420152617.7b3c1d70@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <20220408094817.2494756-1-lv.ruyi@zte.com.cn>

On Fri,  8 Apr 2022 09:48:17 +0000
cgel.zte@gmail.com wrote:

Hi,

> From: Lv Ruyi <lv.ruyi@zte.com.cn>
> 
> of_find_compatible_node() returns node pointer with refcount incremented,
> use of_node_put() on it to decrease refcount when done.

Thanks for the patch, looks alright to me.
There is actually another occurrence in the same file, will send a patch
ASAP.

> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>

Fixes: 220e6cf7b793d702596506a8c4bf1f4fd4040df1 ("ARM: add Highbank core
platform support")

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Arnd, Olof, can you please take this through the soc tree as a fix,
whenever you find time?

Thanks!
Andre

> ---
>  arch/arm/mach-highbank/highbank.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index db607955a7e4..fe82c3d16ffd 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -141,6 +141,7 @@ static void __init highbank_init(void)
>  	/* Map system registers */
>  	np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
>  	sregs_base = of_iomap(np, 0);
> +	of_node_put(np);
>  	WARN_ON(!sregs_base);
>  
>  	pm_power_off = highbank_power_off;


      reply	other threads:[~2022-04-20 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  9:48 cgel.zte
2022-04-20 14:26 ` Andre Przywara [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=20220420152617.7b3c1d70@donnerap.cambridge.arm.com \
    --to=andre.przywara@arm.com \
    --cc=arnd@arndb.de \
    --cc=cgel.zte@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lv.ruyi@zte.com.cn \
    --cc=olof@lixom.net \
    --cc=robh@kernel.org \
    --cc=zealci@zte.com.cn \
    /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®