Re: [PATCH] Input: da9055_onkey - free the requested IRQ on removal

From: Dmitry Torokhov

Date: Sun Oct 18 2026 - 02:13:22 EST


Hi Myeonghun,

On Sat, Oct 17, 2026 at 10:56:50PM -0400, Myeonghun Pak wrote:
> platform_get_irq_byname() returns the Linux IRQ number already
> translated by the MFD core. The probe path requests this IRQ directly,
> but remove passes it through regmap_irq_get_virq() again as a chip-local
> index.
>
> This can access beyond the chip IRQ table or yield a different IRQ, so
> the requested ONKEY interrupt is not released. An interrupt after the
> work cancellation can then access the unregistered input device or queue
> work referencing the freed onkey state.
>
> Remove the second translation so free_irq() stops the same producer that
> probe installed before the delayed work and input device are torn down.

I think it is better to convert the driver to devm as in the patch I
just sent out, it will take care of this issue as well as make the code
simpler.

Thanks.

--
Dmitry