Re: [PATCH] soundwire: fail slave probe if IRQ cleanup cannot be registered
From: Jiawen Liu
Date: Mon Nov 30 2026 - 14:54:43 EST
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, Pierre-Louis, for the review and the pointer to the earlier RFC.
This change covers the probe error path. The locking question during
alert dispatch is still open.
Thanks,
Jiawen