mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
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: c413983eb6
("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>
This commit is contained in:
parent
2a7985136c
commit
173632358f
1 changed files with 1 additions and 0 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Reference in a new issue