* [PATCH] ASoC: samsung: snow: Fix private data and node cleanup on remove
@ 2026-11-24 9:56 Yige Jiang
0 siblings, 0 replies; only message in thread
From: Yige Jiang @ 2026-11-24 9:56 UTC (permalink / raw)
To: Sylwester Nawrocki, Liam Girdwood
Cc: Yige Jiang, Mark Brown, Jaroslav Kysela, Takashi Iwai,
linux-sound, linux-kernel
The ASoC core stores the snd_soc_card pointer in the platform device's
driver data. snow_remove() treats that pointer as a snow_priv instead,
so the accesses to the DAI link and clock use the wrong object. Obtain
the private data through snd_soc_card_get_drvdata(), as the other card
callbacks do.
Also remove the explicit put of link->codecs->of_node. After the modern
DAI-link conversion it is the same node that
snd_soc_of_put_dai_link_codecs() releases. Keeping both puts would cause
an extra reference drop once the private-data lookup is corrected. The
helper alone releases the codec references for both supported bindings.
Fixes: aff8d2bed9e5 ("ASoC: samsung: Add HDMI audio support for Snow")
Fixes: db1623faa432 ("ASoC: samsung: snow: use modern dai_link style")
Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
---
AI assistance was used for analysis and patch preparation.
Based on next-20261104 (8b7179210b22).
Compile-tested: arm64, GCC 14.2.0, W=1, sound/soc/samsung/snow.o;
baseline and patched objects built with no warnings.
Static source review; no hardware, boot, or KASAN test was performed.
sound/soc/samsung/snow.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
index 66ef49dff1ba37de3285cbaaf1293937d6bb0b77..64b3e2e41c2142117cb7d782b59302804d33dda7 100644
--- a/sound/soc/samsung/snow.c
+++ b/sound/soc/samsung/snow.c
@@ -220,11 +220,11 @@ static int snow_probe(struct platform_device *pdev)
static void snow_remove(struct platform_device *pdev)
{
- struct snow_priv *priv = platform_get_drvdata(pdev);
+ struct snd_soc_card *card = platform_get_drvdata(pdev);
+ struct snow_priv *priv = snd_soc_card_get_drvdata(card);
struct snd_soc_dai_link *link = &priv->dai_link;
of_node_put(link->cpus->of_node);
- of_node_put(link->codecs->of_node);
snd_soc_of_put_dai_link_codecs(link);
clk_put(priv->clk_i2s_bus);
base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-24 9:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 9:56 [PATCH] ASoC: samsung: snow: Fix private data and node cleanup on remove Yige Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®