Commit 161ba1f1 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: rsnd: don't call unneeded of_node_put() on dma.c

Current rsnd_dmaen_start() is calling of_node_put() for np,
but it is not needed if it goes through this loop.
This patch tidyup it
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent dae4b832
...@@ -143,19 +143,17 @@ static int rsnd_dmaen_start(struct rsnd_mod *mod, ...@@ -143,19 +143,17 @@ static int rsnd_dmaen_start(struct rsnd_mod *mod,
struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node, struct dma_chan *rsnd_dma_request_channel(struct device_node *of_node,
struct rsnd_mod *mod, char *name) struct rsnd_mod *mod, char *name)
{ {
struct dma_chan *chan; struct dma_chan *chan = NULL;
struct device_node *np; struct device_node *np;
int i = 0; int i = 0;
for_each_child_of_node(of_node, np) { for_each_child_of_node(of_node, np) {
if (i == rsnd_mod_id(mod)) if (i == rsnd_mod_id(mod) && (!chan))
break; chan = of_dma_request_slave_channel(np, name);
i++; i++;
} }
chan = of_dma_request_slave_channel(np, name); /* It should call of_node_put(), since, it is rsnd_xxx_of_node() */
of_node_put(np);
of_node_put(of_node); of_node_put(of_node);
return chan; return chan;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment