]> git.baikalelectronics.ru Git - kernel.git/commitdiff
HSI: omap_ssi_core: fix unbalanced pm_runtime_disable()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 1 Nov 2022 03:41:18 +0000 (11:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:27 +0000 (11:41 +0100)
[ Upstream commit f5181c35ed7ba0ceb6e42872aad1334d994b0175 ]

In error label 'out1' path in ssi_probe(), the pm_runtime_enable()
has not been called yet, so pm_runtime_disable() is not needed.

Fixes: f6a17db405d3 ("HSI: Introduce OMAP SSI driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hsi/controllers/omap_ssi_core.c

index 5aa6955b609f2ef713932afe5e0813b9d4155095..8b8d25c7dc5052b4be776492416dd6d7bd9925c6 100644 (file)
@@ -536,9 +536,9 @@ out3:
        device_for_each_child(&pd->dev, NULL, ssi_remove_ports);
 out2:
        ssi_remove_controller(ssi);
+       pm_runtime_disable(&pd->dev);
 out1:
        platform_set_drvdata(pd, NULL);
-       pm_runtime_disable(&pd->dev);
 
        return err;
 }