Re: [PATCH 2/3] ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control error
From: Mark Brown
Date: Fri Mar 27 2026 - 16:13:11 EST
On Fri, Mar 27, 2026 at 03:30:01PM -0400, aravindanilraj0702@xxxxxxxxx wrote:
> From: Aravind Anilraj <aravindanilraj0702@xxxxxxxxx>
>
> 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.
The changelog does not mention this...
> 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);
...separate change which is unrelated and really should be a separate
patch as covered in submitting-patches.rst.
It's a good enough change, ideally we'd log the return code as well.
Attachment:
signature.asc
Description: PGP signature