diff options
author | Markus Schneider-Pargmann <msp@baylibre.com> | 2023-03-15 12:05:31 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-03-24 19:13:53 +0100 |
commit | 73042934e4a30d9f45ff9cb0b3b029a01dbe7130 (patch) | |
tree | f426629df84598ed353a1f6a52c1abe5b1ea448b /drivers | |
parent | can: esd_usb: Improve code readability by means of replacing struct esd_usb_m... (diff) | |
download | linux-73042934e4a30d9f45ff9cb0b3b029a01dbe7130.tar.xz linux-73042934e4a30d9f45ff9cb0b3b029a01dbe7130.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/m_can/m_can.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 8e83d6963d85..563625a701fc 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -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); |