mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Qing Wang <wangqing@vivo.com>,
	Russell King <linux@armlinux.org.uk>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm: mach-at91: add missing of_node_put
Date: Mon, 13 Dec 2021 14:34:45 +0100	[thread overview]
Message-ID: <d2cae713-0985-eb98-10a3-c1b26ee74fe7@microchip.com> (raw)
In-Reply-To: <1639388520-63567-1-git-send-email-wangqing@vivo.com>

On 13/12/2021 at 10:41, Qing Wang wrote:
> From: Wang Qing <wangqing@vivo.com>
> 
> Fix following coccicheck warning:
> WARNING: Function "for_each_matching_node_and_match"
> should have of_node_put() before return.
> 
> Early exits from for_each_matching_node_and_match should decrement the
> node reference counter.
> 
> Signed-off-by: Wang Qing <wangqing@vivo.com>

Wang,

What's the difference between this patch and the one accepted here:
https://lore.kernel.org/all/20211014084555.21422-1-wanjiabing@vivo.com/

Regards,
   Nicolas

> ---
>   arch/arm/mach-at91/pm.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
> index 8711d68..ca313fe
> --- a/arch/arm/mach-at91/pm.c
> +++ b/arch/arm/mach-at91/pm.c
> @@ -644,6 +644,7 @@ static __init int at91_dt_ramc(bool phy_mandatory)
>                  soc_pm.data.ramc[idx] = of_iomap(np, 0);
>                  if (!soc_pm.data.ramc[idx]) {
>                          pr_err("unable to map ramc[%d] cpu registers\n", idx);
> +                       of_node_put(np);
>                          ret = -ENOMEM;
>                          goto unmap_ramc;
>                  }
> @@ -669,6 +670,7 @@ static __init int at91_dt_ramc(bool phy_mandatory)
>                  soc_pm.data.ramc_phy = of_iomap(np, 0);
>                  if (!soc_pm.data.ramc_phy) {
>                          pr_err("unable to map ramc phy cpu registers\n");
> +                       of_node_put(np);
>                          ret = -ENOMEM;
>                          goto unmap_ramc;
>                  }
> --
> 2.7.4
> 


-- 
Nicolas Ferre

      reply	other threads:[~2021-12-13 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13  9:41 Qing Wang
2021-12-13 13:34 ` Nicolas Ferre [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=d2cae713-0985-eb98-10a3-c1b26ee74fe7@microchip.com \
    --to=nicolas.ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ludovic.desroches@microchip.com \
    --cc=wangqing@vivo.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®