dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe
authorMiaoqian Lin <linmq006@gmail.com>
Sat, 8 Jan 2022 08:53:36 +0000 (08:53 +0000)
committerVinod Koul <vkoul@kernel.org>
Tue, 15 Feb 2022 05:28:04 +0000 (10:58 +0530)
commite831c7aba950f3ae94002b10321279654525e5ec
tree19dc8782e1da8130ff5496f5d58e433a80ca9841
parent2d21543efe332cd8c8f212fb7d365bc8b0690bfa
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: 4f3ceca254e0 ("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>
drivers/dma/stm32-dmamux.c