Message ID | 20241104200120.393312-4-mkl@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | e4de81f9e134c78ff7c75a00e43bd819643530d0 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,1/8] can: j1939: fix error in J1939 documentation. | expand |
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index a978b960f1f1..16e9e7d7527d 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1765,7 +1765,8 @@ static int m_can_close(struct net_device *dev) netif_stop_queue(dev); m_can_stop(dev); - free_irq(dev->irq, dev); + if (dev->irq) + free_irq(dev->irq, dev); m_can_clean(dev);