Commit 1a5ca2aa authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: rsnd: call of_node_put() when break

We need to call of_node_put() when break from
for_each_child_of_node(). This patch add missing
of_node_put().
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarJulia Lawall <julia.lawall@inria.fr>
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bkfh9g68.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a932f45a
...@@ -1293,6 +1293,7 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph) ...@@ -1293,6 +1293,7 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph)
i++; i++;
if (i >= RSND_MAX_COMPONENT) { if (i >= RSND_MAX_COMPONENT) {
dev_info(dev, "reach to max component\n"); dev_info(dev, "reach to max component\n");
of_node_put(node);
break; break;
} }
} }
...@@ -1312,6 +1313,7 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph) ...@@ -1312,6 +1313,7 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph)
i++; i++;
if (i >= RSND_MAX_COMPONENT) { if (i >= RSND_MAX_COMPONENT) {
dev_info(dev, "reach to max component\n"); dev_info(dev, "reach to max component\n");
of_node_put(node);
break; break;
} }
} }
......
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