[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230327073354.1003134-8-mkl@pengutronix.de>
Date: Mon, 27 Mar 2023 09:33:50 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, linux-can@...r.kernel.org,
kernel@...gutronix.de,
Markus Schneider-Pargmann <msp@...libre.com>,
Simon Horman <simon.horman@...igine.com>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: [PATCH net-next 07/11] can: m_can: Remove repeated check for is_peripheral
From: Markus Schneider-Pargmann <msp@...libre.com>
Merge both if-blocks to fix this.
Signed-off-by: Markus Schneider-Pargmann <msp@...libre.com>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Link: https://lore.kernel.org/all/20230315110546.2518305-2-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
---
drivers/net/can/m_can/m_can.c | 4 +---
1 file changed, 1 insertion(+), 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);
--
2.39.2
Powered by blists - more mailing lists