Skip to content

Commit ba569fb

Browse files
can: m_can: m_can_plat_remove(): add missing pm_runtime_disable()
Commit 227619c ("can: m_can: move runtime PM enable/disable to m_can_platform") moved the PM runtime enable from the m_can core driver into the m_can_platform. That patch forgot to move the pm_runtime_disable() to m_can_plat_remove(), so that unloading the m_can_platform driver causes an "Unbalanced pm_runtime_enable!" error message. Add the missing pm_runtime_disable() to m_can_plat_remove() to fix the problem. Cc: Patrik Flykt <[email protected]> Fixes: 227619c ("can: m_can: move runtime PM enable/disable to m_can_platform") Reviewed-by: Markus Schneider-Pargmann <[email protected]> Link: https://patch.msgid.link/20250929-m_can-fix-state-handling-v4-1-682b49b49d9a@pengutronix.de Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent a12f0bc commit ba569fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/can/m_can/m_can_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static void m_can_plat_remove(struct platform_device *pdev)
180180
struct m_can_classdev *mcan_class = &priv->cdev;
181181

182182
m_can_class_unregister(mcan_class);
183-
183+
pm_runtime_disable(mcan_class->dev);
184184
m_can_class_free_dev(mcan_class->net);
185185
}
186186

0 commit comments

Comments
 (0)