public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: aravindanilraj0702@gmail.com
To: broonie@kernel.org, linux-sound@vger.kernel.org
Cc: cezary.rojewski@intel.com, liam.r.girdwood@linux.intel.com,
	peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
	ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com,
	pierre-louis.bossart@linux.dev, perex@perex.cz, tiwai@suse.com,
	linux-kernel@vger.kernel.org,
	Aravind Anilraj <aravindanilraj0702@gmail.com>
Subject: [PATCH v3 1/3] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error
Date: Fri, 27 Mar 2026 17:04:06 -0400	[thread overview]
Message-ID: <20260327210408.430908-2-aravindanilraj0702@gmail.com> (raw)
In-Reply-To: <20260327210408.430908-1-aravindanilraj0702@gmail.com>

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


  reply	other threads:[~2026-03-27 21:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27 19:29 [PATCH 0/3] ASoC: Intel: Fix MCLK leaks in aravindanilraj0702
2026-03-27 19:30 ` [PATCH 1/3] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
2026-03-27 19:30 ` [PATCH 2/3] ASoC: Intel: bytcr_rt5651: " aravindanilraj0702
2026-03-27 20:10   ` Mark Brown
2026-03-27 19:30 ` [PATCH 3/3] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control aravindanilraj0702
2026-03-27 20:11   ` Mark Brown
2026-03-27 20:13 ` [PATCH v2 0/3] ASoC: Intel: Fix MCLK leaks in aravindanilraj0702
2026-03-27 20:13   ` [PATCH v2 1/3] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
2026-03-27 20:13   ` [PATCH v2 2/3] ASoC: Intel: bytcr_rt5651: " aravindanilraj0702
2026-03-27 20:13   ` [PATCH v2 3/3] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control aravindanilraj0702
2026-03-27 21:04 ` [PATCH v3 0/3] ASoC: Intel: Fix MCLK leaks " aravindanilraj0702
2026-03-27 21:04   ` aravindanilraj0702 [this message]
2026-03-27 21:04   ` [PATCH v3 2/3] ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control error aravindanilraj0702
2026-03-27 21:04   ` [PATCH v3 3/3] ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control aravindanilraj0702
2026-03-27 21:06   ` [PATCH v3 0/3] ASoC: Intel: Fix MCLK leaks " Mark Brown
2026-03-28  6:19     ` Aravind
2026-04-09 22:03 ` [PATCH 0/3] ASoC: Intel: Fix MCLK leaks in 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=20260327210408.430908-2-aravindanilraj0702@gmail.com \
    --to=aravindanilraj0702@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=yung-chuan.liao@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox