From a02496a29463e7f0d1643e83aab28adb3dd03f1a Mon Sep 17 00:00:00 2001 From: Aravind Anilraj Date: Wed, 1 Apr 2026 18:05:04 -0400 Subject: [PATCH] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error 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 cleanup call to prevent the clock from leaking. Signed-off-by: Aravind Anilraj Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20260401220507.23557-2-aravindanilraj0702@gmail.com Signed-off-by: Mark Brown --- 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..e4c21c9c5b38 100644 --- a/sound/soc/intel/boards/bytcr_rt5640.c +++ b/sound/soc/intel/boards/bytcr_rt5640.c @@ -289,6 +289,8 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w, return ret; } ret = byt_rt5640_prepare_and_enable_pll1(codec_dai, 48000); + if (ret < 0) + clk_disable_unprepare(priv->mclk); } else { /* * Set codec clock source to internal clock before -- 2.47.3