Re: [PATCH 2/2] ASoC: adau1372: Fix clock leak on PLL lock failure

From: Mark Brown

Date: Wed Mar 25 2026 - 10:41:51 EST


On Tue, Mar 24, 2026 at 10:50:15PM +0100, Jihed Chaibi wrote:

> @@ -807,7 +811,11 @@ static int adau1372_set_power(struct adau1372 *adau1372, bool enable)
> * accessed.
> */
> if (adau1372->use_pll) {
> - adau1372_enable_pll(adau1372);
> + ret = adau1372_enable_pll(adau1372);
> + if (ret) {
> + clk_disable_unprepare(adau1372->mclk);
> + return ret;
> + }
> clk_ctrl |= ADAU1372_CLK_CTRL_CLKSRC;

This disables the clock but we also put the cache into writable mode and
deasserted reset, those need to be unwound too.

Attachment: signature.asc
Description: PGP signature