diff mbox series

[v2,8/9] ASoC: simple-card: Add missing of_node_put() in case of error

Message ID 20230523151223.109551-9-herve.codina@bootlin.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Add support for IIO devices in ASoC | expand

Commit Message

Herve Codina May 23, 2023, 3:12 p.m. UTC
In the error path, a of_node_put() for platform is missing.
Just add it.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 sound/soc/generic/simple-card.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kuninori Morimoto May 23, 2023, 11:24 p.m. UTC | #1
Hi

> In the error path, a of_node_put() for platform is missing.
> Just add it.
> 
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 6f044cc8357e..5a5e4ecd0f61 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -416,6 +416,7 @@  static int __simple_for_each_link(struct asoc_simple_priv *priv,
 
 			if (ret < 0) {
 				of_node_put(codec);
+				of_node_put(plat);
 				of_node_put(np);
 				goto error;
 			}