Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1347416CFD for ; Mon, 20 Jul 2026 12:35:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784550921; cv=none; b=WFPBKVoIXJ+TMgpi0Rewb88KgBYbf0JxXlru4nGKkAqSxHZJMEIUNLka0xkJ+1w/YDUCpcft0NkqtPnROtuNEVWIFRB9xIpUOPzP+9vnlI9ZwmebI95Uwi0i6RocJoDTek5TjyvUWKhIKvZIOnxNttG5cMbUUAsGrx3T64aJj0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784550921; c=relaxed/simple; bh=hz4MR6Yuy8u+mdcanV2wnrinoix1IGwEVOHGvcsxswo=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=uscLOuTD464GSbHiLT4ykPncqOdHkUkOHWODSREs6AVfMpaWjlXW1aoQVfXPi7X0MN0qKs4um1DxWYQiNm2NBblui1ZZy3Kdk3N1r4PlsQf0IlPTFflhb+A6k7+/2aTMLTxwkp7iwSds20slVwhGkt9geXlYRSAjQq8gjAKtIIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tKzQ/qss; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tKzQ/qss" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38FA11F000E9; Mon, 20 Jul 2026 12:35:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784550919; bh=SEXwygV6iumtNnSMT26u50VDdj82ODQ5ZjNTTHKOCic=; h=Subject:To:Cc:From:Date; b=tKzQ/qssbJDgjHFmf0w8jCmA2fkNi3U/0+ZhdTQwm4YBpZi3gBtLgTnaU/2WIdtAK AM/d3ivb2zyOiB9EZcF3EmA8qty6+QfMKNcx02mKzOiRWjrsL+LWJOqadXudG9xNRD /oQZuGX/YIpwCTh9LBxMFeCa2O8MINPx4wYQVYK8= Subject: FAILED: patch "[PATCH] ASoC: mediatek: mt8192: Check runtime resume during probe" failed to apply to 6.1-stable tree To: cassiogabrielcontato@gmail.com,broonie@kernel.org Cc: From: Date: Mon, 20 Jul 2026 14:32:22 +0200 Message-ID: <2026072022-taps-consensus-7d8b@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x e24d5dde56a50946020b134fa8448869093db76a # git commit -s git send-email --to '' --in-reply-to '2026072022-taps-consensus-7d8b@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From e24d5dde56a50946020b134fa8448869093db76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Gabriel?= Date: Wed, 27 May 2026 10:55:47 -0300 Subject: [PATCH] ASoC: mediatek: mt8192: Check runtime resume during probe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The MT8192 AFE probe enables runtime PM temporarily while reinitializing the regmap cache from hardware, but it uses pm_runtime_get_sync() without checking the return value. If runtime resume fails, probe keeps going without the device necessarily being accessible, and pm_runtime_get_sync() may leave the PM usage count incremented. The regmap_reinit_cache() failure path also returns before dropping the temporary PM reference and before clearing pm_runtime_bypass_reg_ctl. Use pm_runtime_resume_and_get() so resume failures do not leak a usage count, and clear the temporary bypass flag after dropping the probe PM reference on all regmap_reinit_cache() outcomes. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel Link: https://patch.msgid.link/20260527-asoc-mt8192-probe-cleanup-v1-2-1bb834d05b72@gmail.com Signed-off-by: Mark Brown diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c index 9f5057eeeff9..db0ae44a86af 100644 --- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c +++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c @@ -2227,15 +2227,19 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev) /* enable clock for regcache get default value from hw */ afe_priv->pm_runtime_bypass_reg_ctl = true; - pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); + if (ret) { + afe_priv->pm_runtime_bypass_reg_ctl = false; + return dev_err_probe(dev, ret, "failed to resume device\n"); + } ret = regmap_reinit_cache(afe->regmap, &mt8192_afe_regmap_config); - if (ret) - return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n"); - pm_runtime_put_sync(dev); afe_priv->pm_runtime_bypass_reg_ctl = false; + if (ret) + return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n"); + regcache_cache_only(afe->regmap, true); regcache_mark_dirty(afe->regmap);