mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Zou Wei <zou_wei@huawei.com>,
	lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, thierry.reding@gmail.com, jonathanh@nvidia.com
Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] ASoC: tegra: Add missing of_node_put() in tegra_machine_parse_phandle()
Date: Thu, 17 Jun 2021 15:36:15 +0300	[thread overview]
Message-ID: <d1183fa4-2f13-d44e-20df-f8c6c847e3bd@gmail.com> (raw)
In-Reply-To: <1623929447-4335-1-git-send-email-zou_wei@huawei.com>

17.06.2021 14:30, Zou Wei пишет:
> The function is missing a of_node_put on node, fix this by adding the call
> before returning.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> ---
>  sound/soc/tegra/tegra_asoc_machine.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c
> index 397f326..cba55ca 100644
> --- a/sound/soc/tegra/tegra_asoc_machine.c
> +++ b/sound/soc/tegra/tegra_asoc_machine.c
> @@ -336,9 +336,12 @@ tegra_machine_parse_phandle(struct device *dev, const char *name)
>  	}
>  
>  	err = devm_add_action_or_reset(dev, tegra_machine_node_release, np);
> -	if (err)
> +	if (err) {
> +		of_node_put(np);
>  		return ERR_PTR(err);
> +	}
>  
> +	of_node_put(np);
>  	return np;
>  }
>  
> 

You haven't tried to check what this auto-generated patch does, haven't
you? I assume it's auto-generated because it's a nonsense.

      reply	other threads:[~2021-06-17 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 11:30 Zou Wei
2021-06-17 12:36 ` Dmitry Osipenko [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=d1183fa4-2f13-d44e-20df-f8c6c847e3bd@gmail.com \
    --to=digetx@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=thierry.reding@gmail.com \
    --cc=tiwai@suse.com \
    --cc=zou_wei@huawei.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®