All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Liang He <windhl@126.com>
Cc: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
	linux-omap@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH v2] arm/mach-omap2: Fix refcount leak bugs
Date: Tue, 28 Jun 2022 07:05:17 +0300	[thread overview]
Message-ID: <Yrp9/Sv6peETdx8v@atomide.com> (raw)
In-Reply-To: <20220620155421.4076532-1-windhl@126.com>

* Liang He <windhl@126.com> [220620 15:49]:
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -135,6 +135,7 @@ static int __init omap4_sram_init(void)
>  		pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
>  			__func__);
>  	sram_pool = of_gen_pool_get(np, "sram", 0);
> +	of_node_put(np);
>  	if (!sram_pool)
>  		pr_warn("%s:Unable to get sram pool needed to handle errata I688\n",
>  			__func__);

Here sram_pool is used after of_node_put() on it. Don't we want to do the
put only after no users?

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Liang He <windhl@126.com>
Cc: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
	linux-omap@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH v2] arm/mach-omap2: Fix refcount leak bugs
Date: Tue, 28 Jun 2022 07:05:17 +0300	[thread overview]
Message-ID: <Yrp9/Sv6peETdx8v@atomide.com> (raw)
In-Reply-To: <20220620155421.4076532-1-windhl@126.com>

* Liang He <windhl@126.com> [220620 15:49]:
> --- a/arch/arm/mach-omap2/omap4-common.c
> +++ b/arch/arm/mach-omap2/omap4-common.c
> @@ -135,6 +135,7 @@ static int __init omap4_sram_init(void)
>  		pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
>  			__func__);
>  	sram_pool = of_gen_pool_get(np, "sram", 0);
> +	of_node_put(np);
>  	if (!sram_pool)
>  		pr_warn("%s:Unable to get sram pool needed to handle errata I688\n",
>  			__func__);

Here sram_pool is used after of_node_put() on it. Don't we want to do the
put only after no users?

Regards,

Tony

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-06-28  4:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 15:54 [PATCH v2] arm/mach-omap2: Fix refcount leak bugs Liang He
2022-06-20 15:54 ` Liang He
2022-06-22  8:53 ` Krzysztof Kozlowski
2022-06-22  8:53   ` Krzysztof Kozlowski
2022-06-28  4:05 ` Tony Lindgren [this message]
2022-06-28  4:05   ` Tony Lindgren

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=Yrp9/Sv6peETdx8v@atomide.com \
    --to=tony@atomide.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=windhl@126.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 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.