Skip to content

Commit e831c7a

Browse files
Yuuoniyvinodkoul
authored andcommitted
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: 4f3ceca ("dmaengine: stm32-dmamux: Add PM Runtime support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/20220108085336.11992-1-linmq006@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 2d21543 commit e831c7a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/dma/stm32-dmamux.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev)
292292
ret = of_dma_router_register(node, stm32_dmamux_route_allocate,
293293
&stm32_dmamux->dmarouter);
294294
if (ret)
295-
goto err_clk;
295+
goto pm_disable;
296296

297297
return 0;
298298

299+
pm_disable:
300+
pm_runtime_disable(&pdev->dev);
299301
err_clk:
300302
clk_disable_unprepare(stm32_dmamux->clk);
301303

0 commit comments

Comments
 (0)