diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-10-18 22:44:16 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-29 20:55:25 +0300 |
commit | 173632358fde7a567f28e07c4549b959ee857986 (patch) | |
tree | f7c770e4f69ceaaa4be8368bdb169ea7585da1bb | |
parent | 2a7985136cac21c8e94e2f1977f052d415d282b0 (diff) | |
download | linux-173632358fde7a567f28e07c4549b959ee857986.tar.xz |
ASoC: rsnd: Fix an error handling path in 'rsnd_node_count()'
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@wanadoo.fr>
Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/4c0e893cbfa21dc76c1ede0b6f4f8cff42209299.1634586167.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/rcar/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 978bd0406729..6a8fe0da7670 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++; |