Re: [PATCH] tty: serial: ip22zilog: Free the interrupt on unbind

From: Greg Kroah-Hartman

Date: Tue Dec 01 2026 - 15:07:26 EST


On Tue, Dec 01, 2026 at 11:20:52PM +0400, Arina Kharlamova via B4 Relay wrote:
> From: Arina Kharlamova <arina.kharlamova@xxxxxxxxxxxx>
>
> ip22zilog_probe() requests the interrupt with request_irq(), and
> nothing frees it. After the driver is unbound the handler stays
> installed, and the next probe fails to request the interrupt and
> calls panic().
>
> Request the interrupt with devm_request_irq(), so it is freed when the
> driver is unbound.

Then don't call unbound :)

>
> Fixes: 3fc36ae6abd2 ("tty: serial: ip22zilog: Use platform device for probing")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Arina Kharlamova <arina.kharlamova@xxxxxxxxxxxx>
> ---
> The interrupt is never freed, so binding the driver again panics.
>
> I found this with spec2patch. It has formal specifications of kernel APIs
> such as devres, runtime PM, clocks and locks. Each one says what a call
> acquires and releases and what a driver has to undo on the error and
> remove paths. I checked this driver against them. With the help of an AI
> coding assistant (Claude); I reviewed the analysis and the fix.
> Compile-tested only, not tested on hardware.

Please test on real hardware, devm_request_irq() has BAD side affects if
used incorrectly.

greg k-h