Re: [PATCH] soundwire: fail slave probe if IRQ cleanup cannot be registered
From: Charles Keepax
Date: Wed Dec 02 2026 - 05:41:04 EST
On Mon, Nov 30, 2026 at 07:54:28PM +0000, Jiawen Liu wrote:
> Hi Charles,
>
> The original code used devm_add_action_or_reset(), which calls the
> action if registration fails. This patch switches to devm_add_action().
> If the devres allocation fails, that helper returns -ENOMEM without
> calling the action.
>
> At that point the new mapping is still in the local variable irq.
> slave->irq is only set after registration succeeds. Dropping
> irq_dispose_mapping(irq) here would leak the mapping, so I'd keep it.
Thanks, I had missed that :-)
Thanks,
Charles