[PATCH v2 10/13] ASoC: mediatek: mt8189: Propagate MCLK errors
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Mon Sep 14 06:28:25 PDT 2026
On 9/14/26 09:28, phucduc.bui at gmail.com wrote:
> From: bui duc phuc <phucduc.bui at gmail.com>
>
> mtk_mclk_en_event() currently ignores errors returned by the MCK
> enable and disable functions.
>
> Propagate these errors.
>
> Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver")
> Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
> ---
> sound/soc/mediatek/mt8189/mt8189-dai-i2s.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/mediatek/mt8189/mt8189-dai-i2s.c b/sound/soc/mediatek/mt8189/mt8189-dai-i2s.c
> index 4826ee250d70..f20dbb410223 100644
> --- a/sound/soc/mediatek/mt8189/mt8189-dai-i2s.c
> +++ b/sound/soc/mediatek/mt8189/mt8189-dai-i2s.c
> @@ -519,6 +519,7 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w,
> struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
> struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt);
> struct mtk_afe_i2s_priv *i2s_priv;
> + int ret = 0;
int ret;
>
> dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x\n",
> __func__, w->name, event);
> @@ -529,17 +530,17 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w,
>
> switch (event) {
> case SND_SOC_DAPM_PRE_PMU:
> - mt8189_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate);
> + ret = mt8189_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate);
> break;
> case SND_SOC_DAPM_POST_PMD:
> i2s_priv->mclk_rate = 0;
> - mt8189_mck_disable(afe, i2s_priv->mclk_id);
> + ret = mt8189_mck_disable(afe, i2s_priv->mclk_id);
> break;
> default:
ret = 0;
> break;
> }
>
> - return 0;
> + return ret;
> }
>
> static const struct snd_soc_dapm_widget mtk_dai_i2s_widgets[] = {
...after which:
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
Cheers,
Angelo
More information about the linux-arm-kernel
mailing list