* [PATCH 6.6.y] ASoC: simple-card-utils: Don't use __free(device_node) at graph_util_parse_dai()
@ 2026-04-09 10:13 Alva Lan
2026-04-13 4:13 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Alva Lan @ 2026-04-09 10:13 UTC (permalink / raw)
To: gregkh, sashal, stable
Cc: linux-sound, Kuninori Morimoto, Thuan Nguyen, Detlev Casanova,
Mark Brown, Alva Lan
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit de74ec718e0788e1998eb7289ad07970e27cae27 ]
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")
Reported-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn>
Reported-by: Detlev Casanova <detlev.casanova@collabora.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn>
Tested-by: Detlev Casanova <detlev.casanova@collabora.com>
Link: https://patch.msgid.link/87eczisyhh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
[ The function asoc_graph_parse_dai() was renamed to graph_util_parse_dai() in
commit b5a95c5bf6d6 ("ASoC: simple_card_utils.h: convert not to use asoc_xxx()")
in 6.7. The fix should be applied to asoc_graph_parse_dai() instead in 6.6. ]
Signed-off-by: Alva Lan <alvalan9@foxmail.com>
---
This is to fix https://lore.kernel.org/stable/20260323134539.475007076@linuxfoundation.org/
---
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 86ccd044b93c..a64484fe5a28 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -1061,6 +1061,7 @@ static int graph_get_dai_id(struct device_node *ep)
int asoc_graph_parse_dai(struct device *dev, struct device_node *ep,
struct snd_soc_dai_link_component *dlc, int *is_single_link)
{
+ struct device_node *node;
struct of_phandle_args args = {};
struct snd_soc_dai *dai;
int ret;
@@ -1068,7 +1069,7 @@ int asoc_graph_parse_dai(struct device *dev, 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
@@ -1110,8 +1111,10 @@ int asoc_graph_parse_dai(struct device *dev, 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);
return ret;
+ }
parse_dai_end:
if (is_single_link)
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 6.6.y] ASoC: simple-card-utils: Don't use __free(device_node) at graph_util_parse_dai()
2026-04-09 10:13 [PATCH 6.6.y] ASoC: simple-card-utils: Don't use __free(device_node) at graph_util_parse_dai() Alva Lan
@ 2026-04-13 4:13 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-04-13 4:13 UTC (permalink / raw)
To: Alva Lan; +Cc: Sasha Levin, stable, Mark Brown, Kuninori Morimoto
> [PATCH 6.6.y] ASoC: simple-card-utils: Don't use __free(device_node)
> at graph_util_parse_dai()
Queued for 6.6 and 6.12, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-13 4:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 10:13 [PATCH 6.6.y] ASoC: simple-card-utils: Don't use __free(device_node) at graph_util_parse_dai() Alva Lan
2026-04-13 4:13 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox