Re: [PATCH] can: m_can: m_can_close(): don't call free_irq() for IRQ-less devices
From: Simon Horman <horms@kernel.org>
Date: 2024-10-01 11:12:41
Also in:
linux-can, lkml
From: Simon Horman <horms@kernel.org>
Date: 2024-10-01 11:12:41
Also in:
linux-can, lkml
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@pengutronix.de>Reviewed-by: Simon Horman <horms@kernel.org>