Re: [PATCH 2/4] ASoC: mediatek: mt8183: Fix APLL enable error handling
From: Mark Brown
Date: Wed Aug 19 2026 - 12:05:16 EST
On Wed, Aug 19, 2026 at 05:18:47PM +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> Currently, the mt8183_apll*_enable() functions call mux_setting(afe, true)
> but do not check its return value to handle failures.
>
> In addition, the cleanup paths of mt8183_apll*_enable() do not call
> mux_setting(afe, false) when the enable operation fails, while the
> mt8183_apll*_disable() functions do.
>
> Add error handling for apll*_mux_setting() and call mux_setting(afe, false)
> in the cleanup paths when mt8183_apll*_enable() fails.
> - apll1_mux_setting(afe, true);
> + ret = apll1_mux_setting(afe, true);
> + if (ret) {
> + dev_err(afe->dev, "%s apll1_mux_setting fail %d\n",
> + __func__, ret);
> + goto ERR_APLL1_MUX_SETTING;
> + }
apll1_mux_setting() logs errors, do we need to add another log?
Attachment:
signature.asc
Description: PGP signature