Re: [PATCH] can: m_can: m_can_close(): don't call free_irq() for IRQ-less devices
From: Simon Horman
Date: Tue Oct 01 2024 - 07:12:48 EST
On Mon, Sep 30, 2024 at 07:45:57PM +0200, Marc Kleine-Budde wrote:
> In commit b382380c0d2d ("can: m_can: Add hrtimer to generate software
> interrupt") support for IRQ-less devices was added. Instead of an
> interrupt, the interrupt routine is called by a hrtimer-based polling
> loop.
>
> That patch forgot to change free_irq() to be only called for devices
> with IRQs. Fix this, by calling free_irq() conditionally only if an
> IRQ is available for the device (and thus has been requested
> previously).
>
> Fixes: b382380c0d2d ("can: m_can: Add hrtimer to generate software interrupt")
> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>