summaryrefslogtreecommitdiff
path: root/drivers/dma/ste_dma40.c
diff options
context:
space:
mode:
authorZhang Shurong <zhang_shurong@foxmail.com>2023-10-05 17:28:35 +0300
committerVinod Koul <vkoul@kernel.org>2023-10-09 08:26:51 +0300
commit0618c077a8c20e8c81e367988f70f7e32bb5a717 (patch)
tree6de08aa344ef76718d094091370434c8c524a9f2 /drivers/dma/ste_dma40.c
parent01f1ae2733e2bb4de92fefcea5fda847d92aede1 (diff)
downloadlinux-0618c077a8c20e8c81e367988f70f7e32bb5a717.tar.xz
dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. We fix it by calling pm_runtime_disable when error returns. Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/tencent_DD2D371DB5925B4B602B1E1D0A5FA88F1208@qq.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r--drivers/dma/ste_dma40.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 89e82508c133..002833fb1fa0 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3668,6 +3668,7 @@ static int __init d40_probe(struct platform_device *pdev)
regulator_disable(base->lcpa_regulator);
regulator_put(base->lcpa_regulator);
}
+ pm_runtime_disable(base->dev);
report_failure:
d40_err(dev, "probe failed\n");