aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <[email protected]>2023-08-09 01:07:45 +0000
committerMark Brown <[email protected]>2023-08-09 12:52:35 +0100
commit1a5ca2aad7b907f9d7101eaba7dfa068b2da3bdd (patch)
tree8485ca9c35a37fa53ed5b29f4238cb76c5361b1d
parenta932f45a1832d18fb64704636a958ef993a1d1da (diff)
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: kernel test robot <[email protected]> Reported-by: Julia Lawall <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sh/rcar/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 9f3d97bc177a..cf2031b7e209 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1293,6 +1293,7 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph)
i++;
if (i >= RSND_MAX_COMPONENT) {
dev_info(dev, "reach to max component\n");
+ of_node_put(node);
break;
}
}
@@ -1312,6 +1313,7 @@ audio_graph:
i++;
if (i >= RSND_MAX_COMPONENT) {
dev_info(dev, "reach to max component\n");
+ of_node_put(node);
break;
}
}