From: Kuninori Morimoto Date: Wed, 9 Aug 2023 01:07:45 +0000 (+0000) Subject: ASoC: rsnd: call of_node_put() when break X-Git-Tag: v6.6-rc1~135^2~3^2~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a5ca2aad7b907f9d7101eaba7dfa068b2da3bdd;p=thirdparty%2Fkernel%2Flinux.git 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 Reported-by: Julia Lawall Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bkfh9g68.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 9f3d97bc177a0..cf2031b7e2099 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; } }