[PATCH] ASoC: cs48l32: Release the runtime PM reference on IRQ read errors

From: Zhu Jun

Date: Thu Nov 19 2026 - 02:57:48 EST


cs48l32_irq() acquires a runtime PM reference before reading the
interrupt registers. If either register read fails, the handler returns
IRQ_NONE without releasing the reference. This can prevent runtime
suspend after a bus error.

Use the existing autosuspend path for both read failures. The handler
still returns IRQ_NONE, and a failed runtime resume still exits
without a put.

Fixes: e2bcbf99d045 ("ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP")
Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/cs48l32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs48l32.c b/sound/soc/codecs/cs48l32.c
index 72c4bf9e8be6..b6974df7595d 100644
--- a/sound/soc/codecs/cs48l32.c
+++ b/sound/soc/codecs/cs48l32.c
@@ -1352,7 +1352,7 @@ static irqreturn_t cs48l32_irq(int irq, void *data)
ret = regmap_read(regmap, CS48L32_IRQ1_STATUS, &eint_pending);
if (ret) {
dev_warn(cs48l32_codec->core.dev, "Read IRQ1_STATUS failed: %d\n", ret);
- return IRQ_NONE;
+ goto out;
}
if ((eint_pending & CS48L32_IRQ1_STS_MASK) == 0)
goto out;
@@ -1360,7 +1360,7 @@ static irqreturn_t cs48l32_irq(int irq, void *data)
ret = regmap_multi_reg_read(regmap, eint1_regs, reg_vals, ARRAY_SIZE(reg_vals));
if (ret) {
dev_warn(cs48l32_codec->core.dev, "Read IRQ regs failed: %d\n", ret);
- return IRQ_NONE;
+ goto out;
}

for (i = 0; i < ARRAY_SIZE(reg_vals); i += 2) {