提交 e831c7ab 编写于 作者: M Miaoqian Lin 提交者: Vinod Koul

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

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>
上级 2d21543e
......@@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
ret = of_dma_router_register(node, stm32_dmamux_route_allocate,
&stm32_dmamux->dmarouter);
if (ret)
goto err_clk;
goto pm_disable;
return 0;
pm_disable:
pm_runtime_disable(&pdev->dev);
err_clk:
clk_disable_unprepare(stm32_dmamux->clk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册