[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211115165452.159744655@linuxfoundation.org>
Date: Mon, 15 Nov 2021 18:03:01 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
Mark Brown <broonie@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.15 686/917] ASoC: rsnd: Fix an error handling path in rsnd_node_count()
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
[ Upstream commit 173632358fde7a567f28e07c4549b959ee857986 ]
If we return before the end of the 'for_each_child_of_node()' iterator, the
reference taken on 'np' must be released.
Add the missing 'of_node_put()' call.
Fixes: c413983eb66a ("ASoC: rsnd: adjust disabled module")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Link: https://lore.kernel.org/r/4c0e893cbfa21dc76c1ede0b6f4f8cff42209299.1634586167.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
sound/soc/sh/rcar/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 978bd0406729a..6a8fe0da7670b 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1225,6 +1225,7 @@ int rsnd_node_count(struct rsnd_priv *priv, struct device_node *node, char *name
if (i < 0) {
dev_err(dev, "strange node numbering (%s)",
of_node_full_name(node));
+ of_node_put(np);
return 0;
}
i++;
--
2.33.0
Powered by blists - more mailing lists