From: Cezary Rojewski <cezary.rojewski@intel.com>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: <linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Mark Brown <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Hans de Goede <hansg@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
"Charles Keepax" <ckeepax@opensource.cirrus.com>
Subject: Re: [PATCH] ASoC: Intel: bytcr_wm5102: Fix MCLK leak on platform_clock_control error
Date: Tue, 28 Apr 2026 10:27:14 +0200 [thread overview]
Message-ID: <a496168b-409d-4270-bc41-70737b9b4a25@intel.com> (raw)
In-Reply-To: <20260427-bytcr-wm5102-mclk-leak-v1-1-02b96d08e99c@gmail.com>
On 2026-04-28 4:38 AM, Cássio Gabriel wrote:
> If byt_wm5102_prepare_and_enable_pll1() fails in the
> SND_SOC_DAPM_EVENT_ON() path, platform_clock_control() returns after
> clk_prepare_enable(priv->mclk) without disabling the clock again.
>
> This leaks an MCLK enable reference on failed power-up attempts. Add the
> missing clk_disable_unprepare() on the error path, matching the unwind
> used by the other Intel platform_clock_control() implementations.
>
> Fixes: 9a87fc1e0619 ("ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102")
> Cc: stable@vger.kernel.org
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
> ---
> sound/soc/intel/boards/bytcr_wm5102.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/intel/boards/bytcr_wm5102.c b/sound/soc/intel/boards/bytcr_wm5102.c
> index 4879f79aef29..4aa0cf49b033 100644
> --- a/sound/soc/intel/boards/bytcr_wm5102.c
> +++ b/sound/soc/intel/boards/bytcr_wm5102.c
> @@ -170,6 +170,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
> ret = byt_wm5102_prepare_and_enable_pll1(codec_dai, 48000);
> if (ret) {
> dev_err(card->dev, "Error setting codec sysclk: %d\n", ret);
> + clk_disable_unprepare(priv->mclk);
> return ret;
> }
> } else {
>
Thank you for the fix.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
next prev parent reply other threads:[~2026-04-28 8:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 2:38 [PATCH] ASoC: Intel: bytcr_wm5102: Fix MCLK leak on platform_clock_control error Cássio Gabriel
2026-04-28 6:55 ` Andy Shevchenko
2026-04-28 8:25 ` Cezary Rojewski
2026-04-28 10:28 ` Cássio Gabriel Monteiro Pires
2026-04-28 12:12 ` Cássio Gabriel Monteiro Pires
2026-04-28 12:53 ` Andy Shevchenko
2026-04-28 8:27 ` Cezary Rojewski [this message]
2026-04-28 8:35 ` Hans de Goede
2026-04-28 8:50 ` 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=a496168b-409d-4270-bc41-70737b9b4a25@intel.com \
--to=cezary.rojewski@intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=cassiogabrielcontato@gmail.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=hansg@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=stable@vger.kernel.org \
--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