From fcf2a365da23994f47af0f1203cf245d5e467b6a Mon Sep 17 00:00:00 2001 From: wangdicheng Date: Fri, 17 Jul 2026 17:15:40 +0800 Subject: [PATCH] ASoC: mediatek: mt8189: Remove redundant else-if branch with identical body Fix a compiler warning about a condition with no effect: sound/mediatek/mt8189/mt8189-dai-adda.c:388:7-9: WARNING: possible condition with no effect (if == else) The MTKAIF_PROTOCOL_2 branch and the else branch both write the same value 0xB0 to AFE_AUD_PAD_TOP_CFG0, making the else-if condition meaningless. Remove the redundant branch. Signed-off-by: wangdicheng Link: https://patch.msgid.link/20260717091542.721877-2-wangdich9700@163.com Signed-off-by: Mark Brown --- sound/soc/mediatek/mt8189/mt8189-dai-adda.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/mediatek/mt8189/mt8189-dai-adda.c b/sound/soc/mediatek/mt8189/mt8189-dai-adda.c index ad5b9546ff63..5c41a6386204 100644 --- a/sound/soc/mediatek/mt8189/mt8189-dai-adda.c +++ b/sound/soc/mediatek/mt8189/mt8189-dai-adda.c @@ -385,8 +385,6 @@ static int mtk_adda_pad_top_event(struct snd_soc_dapm_widget *w, if (event == SND_SOC_DAPM_PRE_PMU) { if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2_CLK_P2) regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB8); - else if (afe_priv->mtkaif_protocol == MTKAIF_PROTOCOL_2) - regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB0); else regmap_write(afe->regmap, AFE_AUD_PAD_TOP_CFG0, 0xB0); }