From: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
To: "Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org"
<Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org"
<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
Kuninori Morimoto
<kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-+7O3WWA3DPshjIn37xzcLOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
On Mon, 24 Feb 2014 02:17:00 +0000
"Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org" <Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 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/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-02-25 7:30 UTC|newest]
Thread overview: 6+ 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-20 17:25 ` [PATCH 1/4] ASoC: simple-card: Fix device node locks Jean-Francois Moine
[not found] ` <4dca81f45b67a4dcb21271e57409ba114c3b59cb.1392995566.git.moinejf-GANU6spQydw@public.gmane.org>
2014-02-24 2:17 ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
[not found] ` <23e531e0edb34aa9b84799e558abaf26-+7O3WWA3DPshjIn37xzcLOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2014-02-25 7:30 ` Jean-Francois Moine [this message]
2014-02-25 12:42 ` Mark Brown
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-ganu6spqydw@public.gmane.org \
--cc=Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).