public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: adau1372: Fix error handling in adau1372_set_power()
@ 2026-03-24 21:50 Jihed Chaibi
  2026-03-24 21:50 ` [PATCH 1/2] ASoC: adau1372: Fix unchecked clk_prepare_enable() return value Jihed Chaibi
  2026-03-24 21:50 ` [PATCH 2/2] ASoC: adau1372: Fix clock leak on PLL lock failure Jihed Chaibi
  0 siblings, 2 replies; 4+ messages in thread
From: Jihed Chaibi @ 2026-03-24 21:50 UTC (permalink / raw)
  To: lars, nuno.sa
  Cc: lgirdwood, broonie, perex, tiwai, linux-sound, linux-kernel,
	jihed.chaibi.dev

adau1372_set_power() had two related error handling issues in its enable
path: clk_prepare_enable() was called but its return value discarded, and
adau1372_enable_pll() was a void function that silently swallowed lock
failures, leaving mclk enabled and adau1372->enabled set to true despite
the device being in a broken state.

Patch 1 fixes the unchecked clk_prepare_enable() by making
adau1372_set_power() return int and propagating the error.

Patch 2 converts adau1372_enable_pll() to return int and adds a
clk_disable_unprepare() unwind in adau1372_set_power() if PLL lock fails.

Jihed Chaibi (2):
  ASoC: adau1372: Fix unchecked clk_prepare_enable() return value
  ASoC: adau1372: Fix clock leak on PLL lock failure

 sound/soc/codecs/adau1372.c | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

-- 
2.47.3


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

end of thread, other threads:[~2026-03-25 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 21:50 [PATCH 0/2] ASoC: adau1372: Fix error handling in adau1372_set_power() Jihed Chaibi
2026-03-24 21:50 ` [PATCH 1/2] ASoC: adau1372: Fix unchecked clk_prepare_enable() return value Jihed Chaibi
2026-03-24 21:50 ` [PATCH 2/2] ASoC: adau1372: Fix clock leak on PLL lock failure Jihed Chaibi
2026-03-25 14:25   ` Mark Brown

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