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=1795023190; b=sCusHCNq53Ju3bO4Dumkm4WiWlFDCSqvu9V5Li+z+ODuazwn7wRF6uM14t3+Fo1vJXc3 z6bZqNOqj1X53GxDm5dzY1zQrbomETq8c/1kzQRO6sJ/uyCAYiHiqZWNzPd8trSZhGv6w /vgEjSsq/rRRoRcJbEIdvtmjeTNJkKqiuq910qXPqEx0BYOAAMOw5huy42kl1foA2QRFF b2SPVhkygXlHxGlj59WzbE+sM83IWxonRuWWady1QzVerQ90WWtHYPOcCJUw04PkkIIdI /7QyISVtjQykDfSRC7kuaLzV+sRd61cIWALSv/mAXYrLBs8OG8fRk/EvMd15HKXSrMQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795023190; 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=tmV1Oy8L1zV6KwfXrFs145lIoXwSlfumopXrr6wP05s=; b=rbeeF/Ssbqa1D5izNgy8xmWwjcZZfz+zQgJzH8U8OxKg7HGFvjFkcDdVL6gwYuZ12zfS +2BztNZJn5htyqoXcYIFc60o0PHdN2gUAI4jjPbbWANct8s3U/QRdvoDfTIbKTCaNEIaB ZgW1y8ZFPNFrgqN6jkWPCuJGJaNTxpNrfsjxQ4JfURyuL+GVO4lKdFJSh0SObhAo85b+e XUBRnMP8yyc4vSyOOJQHa7jaCxfoPhyL8kejKBGtGvM1wFx8tgvrqiR/K5jhzn+c6O08D fsPmAWbkRov9m5MnNgAQvs1woXbn7RW+M74bLax6Rp/3A3kl+mLx8YzdKssqtoR+o5w== 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=nP2K1xh9; 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 3961A606A32A; Wed, 18 Nov 2026 17:33:10 +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=nP2K1xh9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76A7D1F000C4; Wed, 18 Nov 2026 17:33:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795023190; bh=tmV1Oy8L1zV6KwfXrFs145lIoXwSlfumopXrr6wP05s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=nP2K1xh9Q0vvvjg4NuM1MAg1V2oad1cXKe5+pbnOoO+QC7Rol5X5y7wTF9VKrL2r2 TT5alCivwM7bJ9r7OpezTB2lcjix5195iT7txsj06w88cY5hWpKC+6E+RTrScNFyLD KoJOBfsjRXrk88nPU9nqi3qJ6fqL/MJfQA/9ckhE= 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.18 0279/2151] ASoC: mediatek: mt8186: Fix clock handling in mux disable path Date: Wed, 18 Nov 2026 15:33:34 +0100 Message-ID: <20261118150132.038669259@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150121.603863898@linuxfoundation.org> References: <20261118150121.603863898@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: bui duc phuc [ Upstream commit d70109f5510b423e72894dadfbab27087a7b26b0 ] In the disable path of the appl*_mux_setting() functions, clk_disable_unprepare() is called after clk_set_parent(). If clk_set_parent() fails, clk_disable_unprepare() is skipped, potentially leaving one of the clocks enabled. Remove the goto exit paths so that all teardown steps are attempted and any errors are only reported. Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903051150.178057-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/mediatek/mt8186/mt8186-afe-clk.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c index aa8b2eaf7b958..3edd0dd20eed0 100644 --- a/sound/soc/mediatek/mt8186/mt8186-afe-clk.c +++ b/sound/soc/mediatek/mt8186/mt8186-afe-clk.c @@ -131,7 +131,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable) dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", __func__, aud_clks[CLK_TOP_MUX_AUD_ENG1], aud_clks[CLK_CLK26M], ret); - goto EXIT; } clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG1]); @@ -141,7 +140,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable) dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", __func__, aud_clks[CLK_TOP_MUX_AUD_1], aud_clks[CLK_CLK26M], ret); - goto EXIT; } clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]); } @@ -158,7 +156,6 @@ static int apll1_mux_setting(struct mtk_base_afe *afe, bool enable) afe_priv->clk[CLK_CLK26M]); clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_1]); ERR_ENABLE_CLK_TOP_MUX_AUD_1: -EXIT: return ret; } @@ -205,7 +202,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable) dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", __func__, aud_clks[CLK_TOP_MUX_AUD_ENG2], aud_clks[CLK_CLK26M], ret); - goto EXIT; } clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_ENG2]); @@ -215,7 +211,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable) dev_err(afe->dev, "%s clk_set_parent %s-%s fail %d\n", __func__, aud_clks[CLK_TOP_MUX_AUD_2], aud_clks[CLK_CLK26M], ret); - goto EXIT; } clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]); } @@ -232,7 +227,6 @@ static int apll2_mux_setting(struct mtk_base_afe *afe, bool enable) afe_priv->clk[CLK_CLK26M]); clk_disable_unprepare(afe_priv->clk[CLK_TOP_MUX_AUD_2]); ERR_ENABLE_CLK_TOP_MUX_AUD_2: -EXIT: return ret; } -- 2.53.0