Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs48l32: Release the runtime PM reference on IRQ read errors
@ 2026-11-19  7:57 Zhu Jun
  2026-11-19  9:44 ` Charles Keepax
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Jun @ 2026-11-19  7:57 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, david.rhodes, rf, patches, linux-sound, linux-kernel,
	Zhu Jun

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@cmss.chinamobile.com>
---
 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) {



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: cs48l32: Release the runtime PM reference on IRQ read errors
  2026-11-19  7:57 [PATCH] ASoC: cs48l32: Release the runtime PM reference on IRQ read errors Zhu Jun
@ 2026-11-19  9:44 ` Charles Keepax
  0 siblings, 0 replies; 2+ messages in thread
From: Charles Keepax @ 2026-11-19  9:44 UTC (permalink / raw)
  To: Zhu Jun
  Cc: broonie, lgirdwood, david.rhodes, rf, patches, linux-sound,
	linux-kernel

On Thu, Nov 19, 2026 at 03:57:33PM +0800, Zhu Jun wrote:
> 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@cmss.chinamobile.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19  7:57 [PATCH] ASoC: cs48l32: Release the runtime PM reference on IRQ read errors Zhu Jun
2026-11-19  9:44 ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox