summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2025-08-06 17:46:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-29 14:03:07 +0100
commit97760193e892b8995a2580a1ab08cc4bb6c017c5 (patch)
tree2e38495080d0f0910f2c69341280d4dbf90842c9 /drivers
parentaca91cae0c917b834731ae9214c84159665f576b (diff)
downloadlinux-97760193e892b8995a2580a1ab08cc4bb6c017c5.tar.gz
linux-97760193e892b8995a2580a1ab08cc4bb6c017c5.tar.bz2
linux-97760193e892b8995a2580a1ab08cc4bb6c017c5.zip
can: m_can: m_can_plat_remove(): add missing pm_runtime_disable()
[ Upstream commit ba569fb07a7e9e9b71e9282e27e993ba859295c2 ] Commit 227619c3ff7c ("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 <patrik.flykt@linux.intel.com> Fixes: 227619c3ff7c ("can: m_can: move runtime PM enable/disable to m_can_platform") Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com> Link: https://patch.msgid.link/20250929-m_can-fix-state-handling-v4-1-682b49b49d9a@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/can/m_can/m_can_platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c
index de6d8e01bf2e..71cf3662128a 100644
--- a/drivers/net/can/m_can/m_can_platform.c
+++ b/drivers/net/can/m_can/m_can_platform.c
@@ -170,7 +170,7 @@ static int m_can_plat_remove(struct platform_device *pdev)
struct m_can_classdev *mcan_class = &priv->cdev;
m_can_class_unregister(mcan_class);
-
+ pm_runtime_disable(mcan_class->dev);
m_can_class_free_dev(mcan_class->net);
return 0;