mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
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>
This commit is contained in:
parent
e1a00373e1
commit
e517293fd7
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user