summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorFrancesco Dolcini <francesco.dolcini@toradex.com>2024-01-05 00:57:23 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2024-02-14 11:24:30 +0100
commite517293fd72d9044902efae59f05203203a60736 (patch)
treefb60060b414481d7e126570c343181af883993b1 /drivers/net/can
parente1a00373e1305578cd09526aa056940409e6b877 (diff)
downloadlwn-e517293fd72d9044902efae59f05203203a60736.tar.gz
lwn-e517293fd72d9044902efae59f05203203a60736.zip
can: m_can: remove redundant check for pm_clock_support
m_can_clk_start() already skip starting the clock when clock support is disabled, remove the redundant check in m_can_class_register(). This also solves the imbalance with m_can_clk_stop() that is called afterward in the same function before the return. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com> Link: https://lore.kernel.org/all/20240104235723.46931-1-francesco@dolcini.it [mkl: rebased to net-next/main] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/m_can/m_can.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index b7dbce4c342a..290880ce5329 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -2312,11 +2312,9 @@ int m_can_class_register(struct m_can_classdev *cdev)
}
}
- if (cdev->pm_clock_support) {
- ret = m_can_clk_start(cdev);
- if (ret)
- return ret;
- }
+ ret = m_can_clk_start(cdev);
+ if (ret)
+ return ret;
if (cdev->is_peripheral) {
ret = can_rx_offload_add_manual(cdev->net, &cdev->offload,