public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: <aravindanilraj0702@gmail.com>
Cc: <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>, <broonie@kernel.org>,
	<linux-sound@vger.kernel.org>
Subject: Re: [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error
Date: Mon, 30 Mar 2026 10:26:59 +0200	[thread overview]
Message-ID: <ff2412d2-8f3e-4238-a6cc-be643778e5b6@intel.com> (raw)
In-Reply-To: <20260328052556.434191-2-aravindanilraj0702@gmail.com>

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;
>   	}
>   


  reply	other threads:[~2026-03-30  8:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=ff2412d2-8f3e-4238-a6cc-be643778e5b6@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=aravindanilraj0702@gmail.com \
    --cc=broonie@kernel.org \
    --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