From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795030298; b=b8ylO5xeILFZh14dY/GihXBVRG95ReTUpduFe/OTyqpYSzUhs1G2XWzISBMvLnXeO918 Dq+ZGgMRpCMXdyTe+79E502h/4rht3FeCZSa+TY5Tga7vvgyVFwz7BCWXU/xtc2vdGCxb DY/kZXMU3SDKARUF8gGP6qKIE2ibqyiCS3SYSFvgc/ztgitQHU8ZOIDQus4wHF+AtkrPN S2GbSZ5ekx4XPjCTZYror/LHzrXkaukw/ciQ3Vm4Ged7BAUD0ZVqEUrhzX5cshmNk4MKn XfErH7K/RA0zGdCqMg9iLZxJal831Qh/Ba5RLBeUBenQ3HFeMzF+geMqAZP6TSizP8Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795030298; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=jBu780p5/Vpwd1sIHWgm00B99Fon4SvLMtQ19yKQTVA=; b=1uxo+fW64BJB+drwqxJwv94X9lKJyQDDG57GfAlXKbhj3TQ2uIce8UPE550mBtltYveW Ql76CkzynC+ljx8mG3RzGwQ6DsBDL8l+SqGKYtYEt2i/ZCJNd/SeoVJInmpsD5wafL65/ KwxCeqW/HzvW8/V7KE/aruS9dFa6CjGZI89eCacrMfYwZ/GeZm0sgxkX8cmwimHNhKyVZ 3bi+j5DxRAeKLKgf9UjdNQt3EKQl66rle60zwWwWK/BT6FGqt2qWR+GdzsTxQKvH0JBCm mRwN1/BkG8bHMhkfFUHoCUklYkbjmj9Q0fc2fXVSJjQtZuiOSR3zE47DIs+m4S8uDig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=sCkgzl1W; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06E13606A92E; Wed, 18 Nov 2026 19:31:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=sCkgzl1W Received: by smtp.kernel.org (Postfix) with ESMTPSA id 562731F000C5; Wed, 18 Nov 2026 19:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795030297; bh=jBu780p5/Vpwd1sIHWgm00B99Fon4SvLMtQ19yKQTVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sCkgzl1WLl5biYZRErCSiZMGKaBsXh9S4c8KGLfp7R0wx8qo+eyGwRtP1mxnTHBs4 jfIHuVU5Z0QJ/muuq2nOBm2EuttgY28rcJCzVhzmXRDDPIrpKIUB6V5GpwZJOLfoE5 BKCaM0f+XryMwzdgvj4dScPQuuXndPnrPeI/1uBw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, bui duc phuc , Mark Brown , Sasha Levin Subject: [PATCH 6.12 0656/1756] ASoC: mediatek: mt8192: Propagate errors in I2S DAI DAPM event handlers Date: Wed, 18 Nov 2026 15:46:23 +0100 Message-ID: <20261118150034.995601594@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150007.957976754@linuxfoundation.org> References: <20261118150007.957976754@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: bui duc phuc [ Upstream commit 49aeb628d10ef3d5694c39b7a3427d34bde06bb2 ] Currently, DAPM event handlers in mt8192-dai-i2s.c ignore return values from mt8192_afe_gpio_request(), mt8192_apll1_enable(), mt8192_apll2_enable(), and mt8192_mck_enable(). If GPIO configuration or clock setup fails during DAPM events, the error is silently ignored. Fix this by checking and propagating error codes properly in all I2S DAI DAPM event handlers. Fixes: 2c37b4ed730b ("ASoC: mediatek: mt8192: support i2s in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-15-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c b/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c index 47dc7ec4cae7e..374df85411b7c 100644 --- a/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c +++ b/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c @@ -586,6 +586,7 @@ static int mtk_i2s_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; i2s_priv = get_i2s_priv_by_name(afe, w->name); @@ -599,16 +600,17 @@ static int mtk_i2s_en_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - mt8192_afe_gpio_request(afe->dev, true, i2s_priv->id, 0); + ret = mt8192_afe_gpio_request(afe->dev, true, i2s_priv->id, 0); break; case SND_SOC_DAPM_POST_PMD: - mt8192_afe_gpio_request(afe->dev, false, i2s_priv->id, 0); + ret = mt8192_afe_gpio_request(afe->dev, false, i2s_priv->id, 0); break; default: + ret = 0; break; } - return 0; + return ret; } static int mtk_apll_event(struct snd_soc_dapm_widget *w, @@ -617,6 +619,7 @@ static int mtk_apll_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); + int ret; dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x\n", __func__, w->name, event); @@ -624,9 +627,11 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) - mt8192_apll1_enable(afe); + ret = mt8192_apll1_enable(afe); else - mt8192_apll2_enable(afe); + ret = mt8192_apll2_enable(afe); + if (ret) + return ret; break; case SND_SOC_DAPM_POST_PMD: if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) @@ -704,6 +709,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; dev_dbg(cmpnt->dev, "%s(), name %s, event 0x%x\n", __func__, w->name, event); @@ -716,7 +722,9 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - mt8192_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate); + ret = mt8192_mck_enable(afe, i2s_priv->mclk_id, i2s_priv->mclk_rate); + if (ret) + return ret; break; case SND_SOC_DAPM_POST_PMD: i2s_priv->mclk_rate = 0; -- 2.53.0