[PATCH] ASoC: pcm3168a: Disable runtime PM on component registration failure
From: Haowen Tu
Date: Mon Nov 16 2026 - 01:33:16 EST
pcm3168a_probe() enables runtime PM before registering the ASoC component.
If component registration fails, the error path disables the supplies and
clock but leaves runtime PM enabled.
The remove callback is not called after a failed probe, so its
pm_runtime_disable() cannot balance the enable. Runtime PM remains
enabled after the probe resources are released, and a subsequent probe
can encounter an unbalanced pm_runtime_enable().
Disable runtime PM before unwinding the supplies and clock on component
registration failure.
Fixes: a9b17a638af5 ("ASoC: pcm3168a: Add driver for pcm3168a codec")
Signed-off-by: Haowen Tu <tuhaowen@xxxxxxxxxxxxx>
---
sound/soc/codecs/pcm3168a.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 11fd948ecd27..ca0ef9f36658 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -802,6 +802,7 @@ int pcm3168a_probe(struct device *dev, struct regmap *regmap)
ARRAY_SIZE(pcm3168a->dai_drv));
if (ret) {
dev_err(dev, "failed to register component: %d\n", ret);
+ pm_runtime_disable(dev);
goto err_regulator;
}
--
2.50.1