All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
To: lars@metafoo.de, nuno.sa@analog.com
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, jihed.chaibi.dev@gmail.com
Subject: [PATCH 0/2] ASoC: adau1372: Fix error handling in adau1372_set_power()
Date: Tue, 24 Mar 2026 22:50:13 +0100	[thread overview]
Message-ID: <20260324215016.66347-1-jihed.chaibi.dev@gmail.com> (raw)

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


             reply	other threads:[~2026-03-24 21:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 21:50 Jihed Chaibi [this message]
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

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=20260324215016.66347-1-jihed.chaibi.dev@gmail.com \
    --to=jihed.chaibi.dev@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.