Re: [PATCH] ALSA: sgio2audio: Only free successfully requested IRQs
From: Takashi Iwai
Date: Tue Sep 29 2026 - 11:10:02 EST
On Tue, 29 Sep 2026 10:45:40 +0200,
Runyu Xiao wrote:
>
> snd_sgio2audio_create() calls snd_sgio2audio_free() when an IRQ
> request fails. The cleanup helper currently walks the complete IRQ table,
> including entries whose request_irq() calls have not been attempted yet.
> free_irq() then receives an IRQ and dev_id pair that was never registered.
>
> Pass the number of successfully requested IRQs to the cleanup helper on
> the request failure path, while retaining the full-table cleanup for
> teardown after all requests have succeeded.
>
> Fixes: 862c2c0a61c5 ("ALSA: ALSA driver for SGI O2 audio board")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: Runyu Xiao <runyu.xiao@xxxxxxxxxx>
Applied to for-next branch. Thanks.
Takashi