lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241122055231.3463-1-zhujun2@cmss.chinamobile.com>
Date: Thu, 21 Nov 2024 21:52:31 -0800
From: Zhu Jun <zhujun2@...s.chinamobile.com>
To: perex@...ex.cz
Cc: tiwai@...e.com,
	matthias.bgg@...il.com,
	zhujun2@...s.chinamobile.com,
	linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: [PATCH] ASoC: mediatek: mt8188: Add error handling in mtk_dai_etdm_enable_mclk

Introduce error handling in mtk_dai_etdm_enable_mclk to ensure that
the function returns immediately if mt8188_afe_set_clk_rate fails.

Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
---
 sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
index 69a091dad..bd325dc71 100644
--- a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c
@@ -430,6 +430,8 @@ static int mtk_dai_etdm_enable_mclk(struct mtk_base_afe *afe, int dai_id)
 	/* set rate */
 	ret = mt8188_afe_set_clk_rate(afe, afe_priv->clk[clkdiv_id],
 				      etdm_data->mclk_freq);
+	if (ret)
+		return ret;
 
 	mt8188_afe_enable_clk(afe, afe_priv->clk[clkdiv_id]);
 
-- 
2.17.1




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ