summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/mediatek/mt8365/mt8365-dai-i2s.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c
index 3482d8f8b4e7..11b9a5bc7163 100644
--- a/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c
+++ b/sound/soc/mediatek/mt8365/mt8365-dai-i2s.c
@@ -465,13 +465,16 @@ void mt8365_afe_set_i2s_out_enable(struct mtk_base_afe *afe, bool enable)
int i;
unsigned long flags;
struct mt8365_afe_private *afe_priv = afe->platform_priv;
- struct mtk_afe_i2s_priv *i2s_data;
+ struct mtk_afe_i2s_priv *i2s_data = NULL;
for (i = 0; i < DAI_I2S_NUM; i++) {
if (mt8365_i2s_priv[i].adda_link)
i2s_data = afe_priv->dai_priv[mt8365_i2s_priv[i].id];
}
+ if (!i2s_data)
+ return;
+
spin_lock_irqsave(&afe_priv->afe_ctrl_lock, flags);
if (enable) {