[PATCH] ASoC: sti: Return irqreturn_t instead of -EPERM in uni_player_irq_handler()
From: Ian Rogers
Date: Thu Nov 19 2026 - 12:14:04 EST
When UNIPERIF_ITM_UNDERFLOW_REC_DONE_MASK fires while
player->underflow_enabled is false, uni_player_irq_handler() sets
ret = -EPERM and returns it as irqreturn_t. Returning a negative errno
from a hardirq handler triggers report_bad_irq() in note_interrupt()
and bypasses unhandled-IRQ storm accounting (while also clobbering
IRQ_HANDLED if an earlier status bit was handled in the same call).
Leave ret unchanged (IRQ_NONE by default, or IRQ_HANDLED if an earlier
error bit was handled) instead of overwriting it with -EPERM.
Found via Clang -Wassign-enum on an x86_64 allyesconfig build.
Verified by building sound/soc/sti/uniperif_player.o with LLVM=1 W=1
(-Werror) and -Wassign-enum; not runtime-tested on STi hardware.
Fixes: 76c2145ded6b ("ASoC: sti: Add CPU DAI driver for playback")
Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
sound/soc/sti/uniperif_player.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c
index 844ddcfc421a..63dfe2b4d304 100644
--- a/sound/soc/sti/uniperif_player.c
+++ b/sound/soc/sti/uniperif_player.c
@@ -117,7 +117,6 @@ static irqreturn_t uni_player_irq_handler(int irq, void *dev_id)
if (!player->underflow_enabled) {
dev_err(player->dev,
"unexpected Underflow recovering\n");
- ret = -EPERM;
snd_pcm_stream_unlock(player->substream);
return ret;
}
--
2.56.1.708.g77570a6a1d-goog