From: Yige Jiang <yigejiang86@gmail.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: Yige Jiang <yigejiang86@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: samsung: snow: Fix private data and node cleanup on remove
Date: Tue, 24 Nov 2026 17:56:26 +0800 [thread overview]
Message-ID: <confirmed-20261105-21-73b8787ecede@gmail.com> (raw)
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
next reply other threads:[~2026-11-24 9:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 9:56 Yige Jiang [this message]
2026-11-24 16:56 ` [PATCH] ASoC: samsung: snow: Fix private data and node cleanup on remove Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=confirmed-20261105-21-73b8787ecede@gmail.com \
--to=yigejiang86@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=s.nawrocki@samsung.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.