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:
Markus Schneider-Pargmann
2023-03-15 12:05:31 +01:00
committed by Greg Kroah-Hartman
parent 7a145d6ec2
commit 93a3de9432

View File

@@ -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);