[PATCH v3 01/16] can: m_can: Remove repeated check for is_peripheral

Markus Schneider-Pargmann posted 16 patches 2 years, 11 months ago
There is a newer version of this series
[PATCH v3 01/16] can: m_can: Remove repeated check for is_peripheral
Posted by Markus Schneider-Pargmann 2 years, 11 months ago
Merge both if-blocks to fix this.

Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
 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
Re: [PATCH v3 01/16] can: m_can: Remove repeated check for is_peripheral
Posted by Simon Horman 2 years, 11 months ago
On Wed, Mar 15, 2023 at 12:05:31PM +0100, Markus Schneider-Pargmann wrote:
> Merge both if-blocks to fix this.
> 
> Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>