提交 b64da99a 编写于 作者: M Miaoqian Lin 提交者: Zheng Zengkai

dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe

stable inclusion
from stable-v5.10.102
commit 2c35c95d3640979d0f0118b640ddd4b326cf4d81
bugzilla: https://gitee.com/openeuler/kernel/issues/I567K6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2c35c95d3640979d0f0118b640ddd4b326cf4d81

--------------------------------

commit e831c7ab upstream.

The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Fixes: 4f3ceca2 ("dmaengine: stm32-dmamux: Add PM Runtime support")
Signed-off-by: NMiaoqian Lin <linmq006@gmail.com>
Reviewed-by: NAmelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20220108085336.11992-1-linmq006@gmail.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 4068fcde
...@@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev) ...@@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
ret = of_dma_router_register(node, stm32_dmamux_route_allocate, ret = of_dma_router_register(node, stm32_dmamux_route_allocate,
&stm32_dmamux->dmarouter); &stm32_dmamux->dmarouter);
if (ret) if (ret)
goto err_clk; goto pm_disable;
return 0; return 0;
pm_disable:
pm_runtime_disable(&pdev->dev);
err_clk: err_clk:
clk_disable_unprepare(stm32_dmamux->clk); clk_disable_unprepare(stm32_dmamux->clk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册