* [PATCH] ASoC: samsung: snow: Fix private data and node cleanup on remove
@ 2026-11-24 9:56 Yige Jiang
2026-11-24 16:56 ` Mark Brown
0 siblings, 1 reply; 2+ messages 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 related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: samsung: snow: Fix private data and node cleanup on remove
2026-11-24 9:56 [PATCH] ASoC: samsung: snow: Fix private data and node cleanup on remove Yige Jiang
@ 2026-11-24 16:56 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-11-24 16:56 UTC (permalink / raw)
To: Sylwester Nawrocki, Liam Girdwood, Yige Jiang
Cc: Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel
On Tue, 24 Nov 2026 17:56:26 +0800, Yige Jiang wrote:
> ASoC: samsung: snow: Fix private data and node cleanup on remove
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.5
Thanks!
[1/1] ASoC: samsung: snow: Fix private data and node cleanup on remove
https://git.kernel.org/broonie/sound/c/2f218b200765
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-25 11:42 UTC | newest]
Thread overview: 2+ messages (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
2026-11-24 16:56 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.