* [PATCH v4 0/4] ASoC: Intel: Fix MCLK leaks in
@ 2026-03-28 5:25 aravindanilraj0702
2026-03-28 5:25 ` [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: aravindanilraj0702 @ 2026-03-28 5:25 UTC (permalink / raw)
To: broonie, linux-sound
Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, Aravind Anilraj
From: Aravind Anilraj <aravindanilraj0702@gmail.com>
In three Intel ASoC board drivers, the EVENT_ON path in
platform_clock_control() enables MCLK via clk_prepare_enable() but fails
to call clk_disable_unprepare() on subsequent error paths, leaking the
clock reference.
v4: Split dev_err formatting fix into a separate patch 4 as suggested by Mark Brown. Add return code to the error message for better diagnostics.
v3: Restored missing clk_disable_unprepare() guard in patch 2 that was
accidently dropped during v2 rebase.
v2: Guard clk_disable_unprepare() with SND_SOC_DAPM_EVENT_ON() to avoid
calling it in the EVENT_OFF error path where MCLK was never enabled.
Fix this across all three affected drivers.
Aravind Anilraj (4):
ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control
error
ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control
error
ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control
ASoC: Intel: boards: Log error code in MCLK configuration failure
sound/soc/intel/boards/bytcr_rt5640.c | 4 +++-
sound/soc/intel/boards/bytcr_rt5651.c | 4 +++-
sound/soc/intel/boards/cht_bsw_rt5672.c | 4 +++-
3 files changed, 9 insertions(+), 3 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error
2026-03-28 5:25 [PATCH v4 0/4] ASoC: Intel: Fix MCLK leaks in aravindanilraj0702
@ 2026-03-28 5:25 ` aravindanilraj0702
2026-03-30 8:26 ` Cezary Rojewski
2026-03-28 5:25 ` [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: " aravindanilraj0702
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: aravindanilraj0702 @ 2026-03-28 5:25 UTC (permalink / raw)
To: broonie, linux-sound
Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, Aravind Anilraj
From: Aravind Anilraj <aravindanilraj0702@gmail.com>
If byt_rt5640_prepare_and_enable_pll1() fails, the function returns
without calling clk_disable_unprepare() on priv->mclk, which was
already enabled earlier in the same code path. Add the missing
clk_disable_unprepare() call before returning the error.
Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
---
sound/soc/intel/boards/bytcr_rt5640.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 103e0b445603..fce726a9c8c0 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -304,6 +304,8 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
if (ret < 0) {
dev_err(card->dev, "can't set codec sysclk: %d\n", ret);
+ if (SND_SOC_DAPM_EVENT_ON(event))
+ clk_disable_unprepare(priv->mclk);
return ret;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control error
2026-03-28 5:25 [PATCH v4 0/4] ASoC: Intel: Fix MCLK leaks in aravindanilraj0702
2026-03-28 5:25 ` [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
@ 2026-03-28 5:25 ` aravindanilraj0702
2026-03-30 8:28 ` Cezary Rojewski
2026-03-30 16:55 ` Mark Brown
2026-03-28 5:25 ` [PATCH v4 3/4] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control aravindanilraj0702
2026-03-28 5:25 ` [PATCH v4 4/4] ASoC: Intel: boards: Log error code in MCLK configuration failure aravindanilraj0702
3 siblings, 2 replies; 10+ messages in thread
From: aravindanilraj0702 @ 2026-03-28 5:25 UTC (permalink / raw)
To: broonie, linux-sound
Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, Aravind Anilraj
From: Aravind Anilraj <aravindanilraj0702@gmail.com>
If byt_rt5651_prepare_and_enable_pll1() fails, the function returns
without calling clk_disable_unprepare() on priv->mclk, which was
already enabled earlier in the same code path. Add the missing
clk_disable_unprepare() call before returning the error.
Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
---
sound/soc/intel/boards/bytcr_rt5651.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 68cf463f1d50..65944eb4be16 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -205,7 +205,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
if (SND_SOC_DAPM_EVENT_ON(event)) {
ret = clk_prepare_enable(priv->mclk);
if (ret < 0) {
- dev_err(card->dev, "could not configure MCLK state");
+ dev_err(card->dev, "could not configure MCLK state\n");
return ret;
}
ret = byt_rt5651_prepare_and_enable_pll1(codec_dai, 48000, 50);
@@ -224,6 +224,8 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
if (ret < 0) {
dev_err(card->dev, "can't set codec sysclk: %d\n", ret);
+ if (SND_SOC_DAPM_EVENT_ON(event))
+ clk_disable_unprepare(priv->mclk);
return ret;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v4 3/4] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control
2026-03-28 5:25 [PATCH v4 0/4] ASoC: Intel: Fix MCLK leaks in aravindanilraj0702
2026-03-28 5:25 ` [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
2026-03-28 5:25 ` [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: " aravindanilraj0702
@ 2026-03-28 5:25 ` aravindanilraj0702
2026-03-30 8:33 ` Cezary Rojewski
2026-03-28 5:25 ` [PATCH v4 4/4] ASoC: Intel: boards: Log error code in MCLK configuration failure aravindanilraj0702
3 siblings, 1 reply; 10+ messages in thread
From: aravindanilraj0702 @ 2026-03-28 5:25 UTC (permalink / raw)
To: broonie, linux-sound
Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, Aravind Anilraj
From: Aravind Anilraj <aravindanilraj0702@gmail.com>
If snd_soc_dai_set_pll() or snd_soc_dai_set_sysclk() fail inside the
EVENT_ON path, the function returns without calling
clk_disable_unprepare() on ctx->mclk, which was already enabled earlier
in the same code path. Add the missing clk_disable_unprepare() calls
before returning the error.
Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
---
sound/soc/intel/boards/cht_bsw_rt5672.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index 359723f2700e..e5806dc16ff9 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -67,7 +67,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
ret = clk_prepare_enable(ctx->mclk);
if (ret < 0) {
dev_err(card->dev,
- "could not configure MCLK state");
+ "could not configure MCLK state\n");
return ret;
}
}
@@ -77,6 +77,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
CHT_PLAT_CLK_3_HZ, 48000 * 512);
if (ret < 0) {
dev_err(card->dev, "can't set codec pll: %d\n", ret);
+ clk_disable_unprepare(ctx->mclk);
return ret;
}
@@ -85,6 +86,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
48000 * 512, SND_SOC_CLOCK_IN);
if (ret < 0) {
dev_err(card->dev, "can't set codec sysclk: %d\n", ret);
+ clk_disable_unprepare(ctx->mclk);
return ret;
}
} else {
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v4 4/4] ASoC: Intel: boards: Log error code in MCLK configuration failure
2026-03-28 5:25 [PATCH v4 0/4] ASoC: Intel: Fix MCLK leaks in aravindanilraj0702
` (2 preceding siblings ...)
2026-03-28 5:25 ` [PATCH v4 3/4] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control aravindanilraj0702
@ 2026-03-28 5:25 ` aravindanilraj0702
3 siblings, 0 replies; 10+ messages in thread
From: aravindanilraj0702 @ 2026-03-28 5:25 UTC (permalink / raw)
To: broonie, linux-sound
Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, Aravind Anilraj
From: Aravind Anilraj <aravindanilraj0702@gmail.com>
The dev_err() calls in platform_clock_control() for the three Intel ASoC
board drivers do not log the return code when clk_prepare_enable()
fails, making it harder to diagonse failures. Add the error code to the
log message.
Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
---
sound/soc/intel/boards/bytcr_rt5640.c | 2 +-
sound/soc/intel/boards/bytcr_rt5651.c | 2 +-
sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index fce726a9c8c0..19d9e87df6c9 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -285,7 +285,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
if (SND_SOC_DAPM_EVENT_ON(event)) {
ret = clk_prepare_enable(priv->mclk);
if (ret < 0) {
- dev_err(card->dev, "could not configure MCLK state\n");
+ dev_err(card->dev, "could not configure MCLK state: %d\n", ret);
return ret;
}
ret = byt_rt5640_prepare_and_enable_pll1(codec_dai, 48000);
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 65944eb4be16..6d886684fb51 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -205,7 +205,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
if (SND_SOC_DAPM_EVENT_ON(event)) {
ret = clk_prepare_enable(priv->mclk);
if (ret < 0) {
- dev_err(card->dev, "could not configure MCLK state\n");
+ dev_err(card->dev, "could not configure MCLK state: %d\n", ret);
return ret;
}
ret = byt_rt5651_prepare_and_enable_pll1(codec_dai, 48000, 50);
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index e5806dc16ff9..248ad3fd495d 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -67,7 +67,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
ret = clk_prepare_enable(ctx->mclk);
if (ret < 0) {
dev_err(card->dev,
- "could not configure MCLK state\n");
+ "could not configure MCLK state: %d\n", ret);
return ret;
}
}
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error
2026-03-28 5:25 ` [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
@ 2026-03-30 8:26 ` Cezary Rojewski
0 siblings, 0 replies; 10+ messages in thread
From: Cezary Rojewski @ 2026-03-30 8:26 UTC (permalink / raw)
To: aravindanilraj0702
Cc: liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, broonie, linux-sound
On 2026-03-28 6:25 AM, aravindanilraj0702@gmail.com wrote:
> From: Aravind Anilraj <aravindanilraj0702@gmail.com>
>
> If byt_rt5640_prepare_and_enable_pll1() fails, the function returns
> without calling clk_disable_unprepare() on priv->mclk, which was
> already enabled earlier in the same code path. Add the missing
> clk_disable_unprepare() call before returning the error.
>
> Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
> ---
> sound/soc/intel/boards/bytcr_rt5640.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
> index 103e0b445603..fce726a9c8c0 100644
> --- a/sound/soc/intel/boards/bytcr_rt5640.c
> +++ b/sound/soc/intel/boards/bytcr_rt5640.c
> @@ -304,6 +304,8 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
>
> if (ret < 0) {
> dev_err(card->dev, "can't set codec sysclk: %d\n", ret);
> + if (SND_SOC_DAPM_EVENT_ON(event))
> + clk_disable_unprepare(priv->mclk);
This if-statement complicates the situation unnecessarily. Please do
the check in scope of "if (SND_SOC_DAPM_EVENT_ON(event))" found earlier
in this function.
> return ret;
> }
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control error
2026-03-28 5:25 ` [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: " aravindanilraj0702
@ 2026-03-30 8:28 ` Cezary Rojewski
2026-03-30 16:55 ` Mark Brown
1 sibling, 0 replies; 10+ messages in thread
From: Cezary Rojewski @ 2026-03-30 8:28 UTC (permalink / raw)
To: aravindanilraj0702
Cc: liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, broonie, linux-sound
On 2026-03-28 6:25 AM, aravindanilraj0702@gmail.com wrote:
> From: Aravind Anilraj <aravindanilraj0702@gmail.com>
>
> If byt_rt5651_prepare_and_enable_pll1() fails, the function returns
> without calling clk_disable_unprepare() on priv->mclk, which was
> already enabled earlier in the same code path. Add the missing
> clk_disable_unprepare() call before returning the error.
>
> Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
> ---
> sound/soc/intel/boards/bytcr_rt5651.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
> index 68cf463f1d50..65944eb4be16 100644
> --- a/sound/soc/intel/boards/bytcr_rt5651.c
> +++ b/sound/soc/intel/boards/bytcr_rt5651.c
> @@ -205,7 +205,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
> if (SND_SOC_DAPM_EVENT_ON(event)) {
> ret = clk_prepare_enable(priv->mclk);
> if (ret < 0) {
> - dev_err(card->dev, "could not configure MCLK state");
> + dev_err(card->dev, "could not configure MCLK state\n");
> return ret;
> }
> ret = byt_rt5651_prepare_and_enable_pll1(codec_dai, 48000, 50);
> @@ -224,6 +224,8 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
>
> if (ret < 0) {
> dev_err(card->dev, "can't set codec sysclk: %d\n", ret);
> + if (SND_SOC_DAPM_EVENT_ON(event))
> + clk_disable_unprepare(priv->mclk);
Same as for bytcr_rt5640:
This if-statement complicates the situation unnecessarily. Please do
the check in scope of "if (SND_SOC_DAPM_EVENT_ON(event))" found earlier
in this function.
> return ret;
> }
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 3/4] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control
2026-03-28 5:25 ` [PATCH v4 3/4] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control aravindanilraj0702
@ 2026-03-30 8:33 ` Cezary Rojewski
2026-03-30 8:41 ` Cezary Rojewski
0 siblings, 1 reply; 10+ messages in thread
From: Cezary Rojewski @ 2026-03-30 8:33 UTC (permalink / raw)
To: aravindanilraj0702
Cc: liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, broonie, linux-sound
On 2026-03-28 6:25 AM, aravindanilraj0702@gmail.com wrote:
> From: Aravind Anilraj <aravindanilraj0702@gmail.com>
>
> If snd_soc_dai_set_pll() or snd_soc_dai_set_sysclk() fail inside the
> EVENT_ON path, the function returns without calling
> clk_disable_unprepare() on ctx->mclk, which was already enabled earlier
> in the same code path. Add the missing clk_disable_unprepare() calls
> before returning the error.
>
> Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
Thank you for the fix.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
> ---
> sound/soc/intel/boards/cht_bsw_rt5672.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
> index 359723f2700e..e5806dc16ff9 100644
> --- a/sound/soc/intel/boards/cht_bsw_rt5672.c
> +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
> @@ -67,7 +67,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
> ret = clk_prepare_enable(ctx->mclk);
> if (ret < 0) {
> dev_err(card->dev,
> - "could not configure MCLK state");
> + "could not configure MCLK state\n");
> return ret;
> }
> }
> @@ -77,6 +77,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
> CHT_PLAT_CLK_3_HZ, 48000 * 512);
> if (ret < 0) {
> dev_err(card->dev, "can't set codec pll: %d\n", ret);
> + clk_disable_unprepare(ctx->mclk);
> return ret;
> }
>
> @@ -85,6 +86,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
> 48000 * 512, SND_SOC_CLOCK_IN);
> if (ret < 0) {
> dev_err(card->dev, "can't set codec sysclk: %d\n", ret);
> + clk_disable_unprepare(ctx->mclk);
> return ret;
> }
> } else {
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 3/4] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control
2026-03-30 8:33 ` Cezary Rojewski
@ 2026-03-30 8:41 ` Cezary Rojewski
0 siblings, 0 replies; 10+ messages in thread
From: Cezary Rojewski @ 2026-03-30 8:41 UTC (permalink / raw)
To: aravindanilraj0702
Cc: liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
tiwai, linux-kernel, broonie, linux-sound
On 2026-03-30 10:33 AM, Cezary Rojewski wrote:
> On 2026-03-28 6:25 AM, aravindanilraj0702@gmail.com wrote:
>> From: Aravind Anilraj <aravindanilraj0702@gmail.com>
>>
>> If snd_soc_dai_set_pll() or snd_soc_dai_set_sysclk() fail inside the
>> EVENT_ON path, the function returns without calling
>> clk_disable_unprepare() on ctx->mclk, which was already enabled earlier
>> in the same code path. Add the missing clk_disable_unprepare() calls
>> before returning the error.
>>
>> Signed-off-by: Aravind Anilraj <aravindanilraj0702@gmail.com>
>
> Thank you for the fix.
>
> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
>
>> ---
>> sound/soc/intel/boards/cht_bsw_rt5672.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/
>> intel/boards/cht_bsw_rt5672.c
>> index 359723f2700e..e5806dc16ff9 100644
>> --- a/sound/soc/intel/boards/cht_bsw_rt5672.c
>> +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
>> @@ -67,7 +67,7 @@ static int platform_clock_control(struct
>> snd_soc_dapm_widget *w,
>> ret = clk_prepare_enable(ctx->mclk);
>> if (ret < 0) {
>> dev_err(card->dev,
>> - "could not configure MCLK state");
>> + "could not configure MCLK state\n");
I've overlooked the string changes. For all three leading patches,
please ensure only clk_disable_unprepare() is part of them. The updates
to the dev_err() make the patches non-atomic and you already have a
dedicated patch for dev_err() - the fourth patch. Do those changes there.
>> return ret;
>> }
>> }
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control error
2026-03-28 5:25 ` [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: " aravindanilraj0702
2026-03-30 8:28 ` Cezary Rojewski
@ 2026-03-30 16:55 ` Mark Brown
1 sibling, 0 replies; 10+ messages in thread
From: Mark Brown @ 2026-03-30 16:55 UTC (permalink / raw)
To: aravindanilraj0702
Cc: linux-sound, cezary.rojewski, liam.r.girdwood, peter.ujfalusi,
yung-chuan.liao, ranjani.sridharan, kai.vehmanen,
pierre-louis.bossart, perex, tiwai, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]
On Sat, Mar 28, 2026 at 01:25:53AM -0400, aravindanilraj0702@gmail.com wrote:
> If byt_rt5651_prepare_and_enable_pll1() fails, the function returns
> without calling clk_disable_unprepare() on priv->mclk, which was
> already enabled earlier in the same code path. Add the missing
> clk_disable_unprepare() call before returning the error.
> if (SND_SOC_DAPM_EVENT_ON(event)) {
> ret = clk_prepare_enable(priv->mclk);
> if (ret < 0) {
> - dev_err(card->dev, "could not configure MCLK state");
> + dev_err(card->dev, "could not configure MCLK state\n");
> return ret;
> }
> ret = byt_rt5651_prepare_and_enable_pll1(codec_dai, 48000, 50);
As I said on prior versions this has an unrelated change in this print.
Please don't ignore review comments, people are generally making them
for a reason and are likely to have the same concerns if issues remain
unaddressed. Having to repeat the same comments can get repetitive and
make people question the value of time spent reviewing. If you disagree
with the review comments that's fine but you need to reply and discuss
your concerns so that the reviewer can understand your decisions.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-03-30 16:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-28 5:25 [PATCH v4 0/4] ASoC: Intel: Fix MCLK leaks in aravindanilraj0702
2026-03-28 5:25 ` [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
2026-03-30 8:26 ` Cezary Rojewski
2026-03-28 5:25 ` [PATCH v4 2/4] ASoC: Intel: bytcr_rt5651: " aravindanilraj0702
2026-03-30 8:28 ` Cezary Rojewski
2026-03-30 16:55 ` Mark Brown
2026-03-28 5:25 ` [PATCH v4 3/4] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control aravindanilraj0702
2026-03-30 8:33 ` Cezary Rojewski
2026-03-30 8:41 ` Cezary Rojewski
2026-03-28 5:25 ` [PATCH v4 4/4] ASoC: Intel: boards: Log error code in MCLK configuration failure aravindanilraj0702
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox