[PATCH] ASoC: arizona-jack: Fix runtime PM leak in arizona_start_mic()

From: Wentao Liang

Date: Thu Sep 17 2026 - 15:53:11 EST


arizona_start_mic() takes a runtime PM reference before enabling mic
detection, but the error path taken when regmap_update_bits_check()
fails returns without releasing it, since pm_runtime_put_autosuspend()
is only called in the !change branch. This leaks a runtime PM reference
whenever the register write fails.

Release the reference on the error path as well.

Fixes: fbdc60b2a787 ("extcon: arizona: Correct error handling on regmap_update_bits_check")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
---
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-jack.c
index a9063bac2752..09a100846fdb 100644
--- a/sound/soc/codecs/arizona-jack.c
+++ b/sound/soc/codecs/arizona-jack.c
@@ -274,6 +274,7 @@ static void arizona_start_mic(struct arizona_priv *info)
&change);
if (ret < 0) {
dev_err(arizona->dev, "Failed to enable micd: %d\n", ret);
+ pm_runtime_put_autosuspend(arizona->dev);
} else if (!change) {
regulator_disable(info->micvdd);
pm_runtime_put_autosuspend(arizona->dev);
--
2.34.1