[PATCH v7 0/3] Add HDMI audio on the rk3588 SoC
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Mon Feb 24 22:16:50 PST 2025
Hi Detlev, again
> > Especially those commits:
> > ASoC: audio-graph-card2: use __free(device_node) for device node
> > ASoC: audio-graph-card: use __free(device_node) for device node
> > ASoC: simple-card: use __free(device_node) for device node
>
> I got same report from our test team. I'm now tring to solve it.
Unfortunately, I can't reproduce the issue on my environment,
but I guess I found the root cause. Does attached patch can solve
your issue ?
I will officially post the patch to ML, but want to confirm it before it.
Thank you for your help !!
Best regards
---
Kuninori Morimoto
-------------- next part --------------
From 3995478ae84240b24964a458ecbefe9fb6dc2272 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
Date: Tue, 25 Feb 2025 09:54:47 +0900
Subject: [PATCH] ASoC: simple-card-utils: Don't use __free(device_node) at
graph_util_parse_dai()
commit 419d1918105e ("ASoC: simple-card-utils: use __free(device_node) for
device node") uses __free(device_node) for dlc->of_node, but we need to
keep it while driver is in use.
Don't use __free(device_node) in graph_util_parse_dai().
Fixes: 419d1918105e ("ASoC: simple-card-utils: use __free(device_node) for device node")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/generic/simple-card-utils.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 51e0e434514d..79fdd57a470c 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -1102,6 +1102,7 @@ static int graph_get_dai_id(struct device_node *ep)
int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
struct snd_soc_dai_link_component *dlc, int *is_single_link)
{
+ struct device_node *node;
struct device *dev = simple_priv_to_dev(priv);
struct of_phandle_args args = {};
struct snd_soc_dai *dai;
@@ -1110,7 +1111,7 @@ int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
if (!ep)
return 0;
- struct device_node *node __free(device_node) = of_graph_get_port_parent(ep);
+ node = of_graph_get_port_parent(ep);
/*
* Try to find from DAI node
@@ -1153,8 +1154,10 @@ int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
* if he unbinded CPU or Codec.
*/
ret = snd_soc_get_dlc(&args, dlc);
- if (ret < 0)
+ if (ret < 0) {
+ of_node_put(node);
goto end;
+ }
parse_dai_end:
if (is_single_link)
--
2.43.0
More information about the Linux-rockchip
mailing list