RE: [PATCH 1/4] ASoC: simple-card: Fix device node locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> @@ -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 ?


> +	}
>  	if (ret < 0)
>  		return ret;
> 
>  	/* CODEC sub-node */
>  	ret = -EINVAL;
>  	np = of_get_child_by_name(node, "simple-audio-card,codec");
> -	if (np)
> +	if (np) {
>  		ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
>  						  &priv->codec_dai,
>  						  &dai_link->codec_of_node,
>  						  &dai_link->codec_dai_name);
> +		of_node_put(np);

The same here...

> +	}
>  	if (ret < 0)
>  		return ret;
> 

Thanks,

--
Best Regards,
Xiubo

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux