mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
can: m_can: Remove repeated check for is_peripheral
[ Upstream commit 73042934e4 ]
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>
Stable-dep-of: 801ad2f87b0c ("can: m_can: enable NAPI before enabling interrupts")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7a145d6ec2
commit
93a3de9432
@@ -1566,10 +1566,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