public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: "Li.Xiubo@freescale.com" <Li.Xiubo@freescale.com>
Cc: Mark Brown <broonie@kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 1/4] ASoC: simple-card: Fix device node locks
Date: Tue, 25 Feb 2014 08:30:56 +0100	[thread overview]
Message-ID: <20140225083056.7bfb35f6@armhf> (raw)
In-Reply-To: <23e531e0edb34aa9b84799e558abaf26@BY2PR03MB505.namprd03.prod.outlook.com>

On Mon, 24 Feb 2014 02:17:00 +0000
"Li.Xiubo@freescale.com" <Li.Xiubo@freescale.com> wrote:

> > @@ -169,22 +164,26 @@ static int asoc_simple_card_parse_of(struct device_node
> > *node,
> >  	/* CPU sub-node */
> >  	ret = -EINVAL;
> >  	np = of_get_child_by_name(node, "simple-audio-card,cpu");
> > -	if (np)
> > +	if (np) {
> >  		ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
> >  						  &priv->cpu_dai,
> >  						  &dai_link->cpu_of_node,
> >  						  &dai_link->cpu_dai_name);
> > +		of_node_put(np);
> 
> Does the of_node_put(np) is really needed here ?
	[snip]

Yes, of_get_child_by_name() increments the node refcount and np is not
used afterwards.

But, you are right, this creates a bug in the next patch when using
of_get_next_child(). I will fix it.

Thanks.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

  reply	other threads:[~2014-02-25  7:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 15:12 [PATCH 0/4] ASoC: simple-card: DT fix and multi DAI links extension Jean-Francois Moine
2014-02-19 18:07 ` [PATCH 2/4] ASoC: simple-card: dynamically allocate the DAI link array Jean-Francois Moine
2014-02-24  3:32   ` Li.Xiubo
2014-02-25  8:02     ` [alsa-devel] " Jean-Francois Moine
2014-02-20 17:25 ` [PATCH 1/4] ASoC: simple-card: Fix device node locks Jean-Francois Moine
2014-02-24  2:17   ` Li.Xiubo
2014-02-25  7:30     ` Jean-Francois Moine [this message]
2014-02-25 12:42   ` Mark Brown
2014-02-21  8:56 ` [PATCH 3/4] ASoC: simple-card: accept many DAI links Jean-Francois Moine
2014-02-21 11:43 ` [PATCH 4/4] ASoC: simple-card: add DT documentation for multi-DAI links Jean-Francois Moine

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=20140225083056.7bfb35f6@armhf \
    --to=moinejf@free.fr \
    --cc=Li.Xiubo@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    /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