public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: "Cássio Gabriel Monteiro Pires" <cassiogabrielcontato@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
	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>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] ASoC: Intel: bytcr_wm5102: Fix MCLK leak on platform_clock_control error
Date: Tue, 28 Apr 2026 09:12:58 -0300	[thread overview]
Message-ID: <2cd5d716-1e42-46c7-abbd-8d2022b9fab6@gmail.com> (raw)
In-Reply-To: <d4d340ad-d181-4892-8f70-9b71f2cbef83@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1422 bytes --]

On 4/28/26 07:28, Cássio Gabriel Monteiro Pires wrote:
> On 4/28/26 03:55, Andy Shevchenko wrote:
>>
>> There are 6 drivers that do the same, why is only this one special?
>> Have you checked the flow on the error path of the caller of this
>> `platform_clock_control()`? Maybe there it calls with the opposite
>> event to shut the clock down?
>>
>> TL;DR: If it's a real issue, it has to be fixed for all affected drivers.
> 
> Yes, I'm going to check the other drivers.
> 

I checked the other platform_clock_control() users under
sound/soc/intel/boards/.

The same bug pattern exists when the ON path does:

        clk_prepare_enable()
        <fallible codec PLL/sysclk setup>
        return error without clk_disable_unprepare()

The affected drivers are bytcr_rt5640, bytcr_rt5651, cht_bsw_rt5672 and
bytcr_wm5102. The first three were already fixed by a02496a29463,
b022e5c142ef and dced5a373a96. This patch fixes the remaining one.

The other two MCLK platform_clock_control() users, cht_bsw_rt5645 and
cht_bsw_max98090_ti, only enable MCLK in the ON path and do not perform a
later fallible codec-clock setup in that same path, so I do not see the
same leak there.

I also checked the DAPM event path; failed widget callbacks are logged,
but there is no opposite-event rollback guarantee that would balance the
clock enable from the failed callback.

-- 
Thanks,
Cássio


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2026-04-28 12:13 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 [this message]
2026-04-28 12:53       ` Andy Shevchenko
2026-04-28  8:27 ` Cezary Rojewski
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=2cd5d716-1e42-46c7-abbd-8d2022b9fab6@gmail.com \
    --to=cassiogabrielcontato@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.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