mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
can: m_can: Remove repeated check for is_peripheral
Merge both if-blocks to fix this. Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/all/20230315110546.2518305-2-msp@baylibre.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
committed by
Marc Kleine-Budde
parent
a57915aee3
commit
73042934e4
@@ -1592,10 +1592,8 @@ static int m_can_close(struct net_device *dev)
|
||||
cdev->tx_skb = NULL;
|
||||
destroy_workqueue(cdev->tx_wq);
|
||||
cdev->tx_wq = NULL;
|
||||
}
|
||||
|
||||
if (cdev->is_peripheral)
|
||||
can_rx_offload_disable(&cdev->offload);
|
||||
}
|
||||
|
||||
close_candev(dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user