public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/4] ASoC: Intel: Fix MCLK leaks in
@ 2026-03-28  5:25 aravindanilraj0702
  2026-03-28  5:25 ` [PATCH v4 1/4] ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control error aravindanilraj0702
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: aravindanilraj0702 @ 2026-03-28  5:25 UTC (permalink / raw)
  To: broonie, linux-sound
  Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
	ranjani.sridharan, kai.vehmanen, pierre-louis.bossart, perex,
	tiwai, linux-kernel, Aravind Anilraj

From: Aravind Anilraj <aravindanilraj0702@gmail.com>

In three Intel ASoC board drivers, the EVENT_ON path in
platform_clock_control() enables MCLK via clk_prepare_enable() but fails
to call clk_disable_unprepare() on subsequent error paths, leaking the
clock reference.

v4: Split dev_err formatting fix into a separate patch 4 as suggested by Mark Brown. Add return code to the error message for better diagnostics.

v3: Restored missing clk_disable_unprepare() guard in patch 2 that was
accidently dropped during v2 rebase.

v2: Guard clk_disable_unprepare() with SND_SOC_DAPM_EVENT_ON() to avoid
calling it in the EVENT_OFF error path where MCLK was never enabled.

Fix this across all three affected drivers.

Aravind Anilraj (4):
  ASoC: Intel: bytcr_rt5640: Fix MCLK leak on platform_clock_control
    error
  ASoC: Intel: bytcr_rt5651: Fix MCLK leak on platform_clock_control
    error
  ASoC: Intel: cht_bsw_rt5672: Fix MCLK leak in platform_clock_control
  ASoC: Intel: boards: Log error code in MCLK configuration failure

 sound/soc/intel/boards/bytcr_rt5640.c   | 4 +++-
 sound/soc/intel/boards/bytcr_rt5651.c   | 4 +++-
 sound/soc/intel/boards/cht_bsw_rt5672.c | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-03-30 16:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox