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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:01:07 +0000 (12:01 +0100)
commit2c35c95d3640979d0f0118b640ddd4b326cf4d81
tree2803009cc830630635adeaebd24ffd5e518b4f92
parent4f907b6eb701a5f7c56bc401197eb3b51db0cd8d
dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe

commit e831c7aba950f3ae94002b10321279654525e5ec 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/stm32-dmamux.c