[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140225083056.7bfb35f6@armhf>
Date: Tue, 25 Feb 2014 08:30:56 +0100
From: Jean-Francois Moine <moinejf@...e.fr>
To: "Li.Xiubo@...escale.com" <Li.Xiubo@...escale.com>
Cc: Mark Brown <broonie@...nel.org>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"Kuninori Morimoto" <kuninori.morimoto.gx@...esas.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH 1/4] ASoC: simple-card: Fix device node locks
On Mon, 24 Feb 2014 02:17:00 +0000
"Li.Xiubo@...escale.com" <Li.Xiubo@...escale.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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists