diff options
-rw-r--r-- | drivers/net/can/m_can/m_can.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 97666a759595..ec6e740b0324 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -1600,7 +1600,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); if (cdev->is_peripheral) { cdev->tx_skb = NULL; |