* [PATCH 03/20] ASoC: samsung: snow: Fix clock leak in snow_probe()
@ 2026-09-16 7:03 Wentao Liang
2026-09-16 11:22 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Wentao Liang @ 2026-09-16 7:03 UTC (permalink / raw)
To: broonie
Cc: krzk, lgirdwood, linux-kernel, linux-sound, perex, s.nawrocki,
tiwai, Wentao Liang, stable
In snow_probe(), priv->clk_i2s_bus is acquired via of_clk_get_by_name().
If devm_snd_soc_register_card() subsequently fails, the acquired clock
is never released, leading to a reference count leak.
Add clk_put() on the error path to release the clock properly.
Fixes: aff8d2bed9e5 ("ASoC: samsung: Add HDMI audio support for Snow")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
sound/soc/samsung/snow.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c
index 66ef49dff1ba..ad99c153e9f8 100644
--- a/sound/soc/samsung/snow.c
+++ b/sound/soc/samsung/snow.c
@@ -211,9 +211,11 @@ static int snow_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, priv);
ret = devm_snd_soc_register_card(dev, card);
- if (ret)
+ if (ret) {
+ clk_put(priv->clk_i2s_bus);
return dev_err_probe(&pdev->dev, ret,
"snd_soc_register_card failed\n");
+ }
return 0;
}
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 03/20] ASoC: samsung: snow: Fix clock leak in snow_probe()
2026-09-16 7:03 [PATCH 03/20] ASoC: samsung: snow: Fix clock leak in snow_probe() Wentao Liang
@ 2026-09-16 11:22 ` Mark Brown
2026-11-07 16:45 ` Wentao Liang
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2026-09-16 11:22 UTC (permalink / raw)
To: Wentao Liang
Cc: krzk, lgirdwood, linux-kernel, linux-sound, perex, s.nawrocki,
tiwai, stable
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
On Wed, Sep 16, 2026 at 07:03:41AM +0000, Wentao Liang wrote:
> In snow_probe(), priv->clk_i2s_bus is acquired via of_clk_get_by_name().
> If devm_snd_soc_register_card() subsequently fails, the acquired clock
> is never released, leading to a reference count leak.
You've not copied me on the rest of the series so I don't know what's
going on with dependencies. When sending a patch series it is important
to ensure that all the various maintainers understand what the
relationship between the patches as the expecation is that there will be
interdependencies. Either copy everyone on the whole series or at least
copy them on the cover letter and explain what's going on. If there are
no strong interdependencies then it's generally simplest to just send
the patches separately to avoid any possible confusion.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 03/20] ASoC: samsung: snow: Fix clock leak in snow_probe()
2026-09-16 11:22 ` Mark Brown
@ 2026-11-07 16:45 ` Wentao Liang
0 siblings, 0 replies; 3+ messages in thread
From: Wentao Liang @ 2026-11-07 16:45 UTC (permalink / raw)
To: Mark Brown
Cc: Krzysztof Kozlowski, Liam Girdwood, Takashi Iwai,
Sylwester Nawrocki, Jaroslav Kysela, linux-sound, linux-kernel
Hi Mark,
I am sorry for the very late reply.
There was no series: the patches I sent that morning are independent
fixes for unrelated bugs in different subsystems, each with its own
Fixes tag and no dependency on the others. The "03/20" numbering was a
mistake in how I prepared the mails, and no cover letter was sent, so
there was nothing you could have been copied on that would have
explained a relationship. Sorry for the confusion.
Patch 3 is self-contained and still applies to current mainline as
posted. I will send such fixes individually from now on.
Thanks,
Wentao
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-07 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 7:03 [PATCH 03/20] ASoC: samsung: snow: Fix clock leak in snow_probe() Wentao Liang
2026-09-16 11:22 ` Mark Brown
2026-11-07 16:45 ` Wentao Liang
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®