From nobody Fri Sep 25 06:03:56 2026 Received: from cstnet.cn (smtp81.cstnet.cn [159.226.251.81]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0B5344998E; Wed, 16 Sep 2026 07:29:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.226.251.81 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789543790; cv=none; b=Qj3aWDlNbG9W5j7ni3T3hbDhVNYmjkehd7GjD7ZoSuNWWIGB6su05kN+o912zfGUVFJyNF0tLneuFwEIGIpNHcmRto6/rVs1SnX7/VkxcTJhJayNHrWDJhVUi8cPPMojOsTVeLdKqIHndfNbxEk6t6WwulV/rnva0qmAbl8RPhk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789543790; c=relaxed/simple; bh=H96PbQbIeciJSeGmI1wVjzVFKtesSzBqQg+dMQVLm8E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ofniM1pkkvpTEYc2VPbUH43bbzn+kRmCpJWO+ujEQqlqQvJ/+0loYMifX/gurmd4hQwjExRCGLEyfzhTbcQ8+djOaOAt08gMSMy7z82XPKcbubmiKkxE145dBiXfeG2oZsq8qw1VC5+yiXCzfE/WoQJsogsROKtG0cFjY772200= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=none smtp.client-ip=159.226.251.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from dfae2b116770.home.arpa (unknown [36.110.52.2]) by APP-03 (Coremail) with SMTP id rQCowADX2jhYRapqSyTfBw--.41369S2; Wed, 16 Sep 2026 15:29:28 +0800 (CST) From: Wentao Liang To: broonie@kernel.org Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, perex@perex.cz, tiwai@suse.com, Wentao Liang , stable@vger.kernel.org Subject: [PATCH] ASoC: arizona-jack: Fix runtime PM imbalance in arizona_start_hpdet_acc_id() Date: Wed, 16 Sep 2026 07:29:00 +0000 Message-Id: <20260916072900.1971595-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: rQCowADX2jhYRapqSyTfBw--.41369S2 X-Coremail-Antispam: 1UD129KBjvJXoWrZw17uF17uFyfKF15Kry7trb_yoW8Jr1Upr n7WrWkJFWrt3yUC3ZavF18XFykuFWjkrW3tr97t3W7Ar13JFs2vFWUGr1Yya10yr95uasx Jr12v343ZF1qyaUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvj14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jw0_WrylYx0Ex4A2jsIE14v26F4j6r4UJwAm72CE4IkC6x0Yz7v_Jr 0_Gr1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkF7I0En4kS14v2 6r1q6r43MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrV AFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCI c40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267 AKxVWxJVW8Jr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j 6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJbIYCTnIWIevJa73UjIFyTuYvjfUFh L0UUUUU X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiBwIMA2qqQJUUWAAAsT Content-Type: text/plain; charset="utf-8" In arizona_start_hpdet_acc_id(), pm_runtime_get_sync() is called to keep the device powered during headphone detection. If setting the HPDET mode or starting the measurement fails and the function jumps to err, pm_runtime_put_autosuspend() was not called while info->hpdet_active was set to false, resulting in a runtime PM usage count leak. Add pm_runtime_put_autosuspend() in the err error path to keep runtime PM balanced. Fixes: 9dd5e53d9d2f ("extcon: arizona: Retry HPDET identification for high = impedance") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Reviewed-by: Charles Keepax --- sound/soc/codecs/arizona-jack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/arizona-jack.c b/sound/soc/codecs/arizona-jac= k.c index a9063bac2752..c84e4961655f 100644 --- a/sound/soc/codecs/arizona-jack.c +++ b/sound/soc/codecs/arizona-jack.c @@ -698,6 +698,7 @@ static void arizona_start_hpdet_acc_id(struct arizona_p= riv *info) snd_soc_jack_report(info->jack, SND_JACK_HEADPHONE, SND_JACK_LINEOUT | SND_JACK_HEADPHONE); =20 + pm_runtime_put_autosuspend(arizona->dev); info->hpdet_active =3D false; } =20 --=20 2.34.1