Commit 0618c077 authored by Zhang Shurong's avatar Zhang Shurong Committed by Vinod Koul

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: default avatarZhang Shurong <zhang_shurong@foxmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/tencent_DD2D371DB5925B4B602B1E1D0A5FA88F1208@qq.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 01f1ae27
...@@ -3668,6 +3668,7 @@ static int __init d40_probe(struct platform_device *pdev) ...@@ -3668,6 +3668,7 @@ static int __init d40_probe(struct platform_device *pdev)
regulator_disable(base->lcpa_regulator); regulator_disable(base->lcpa_regulator);
regulator_put(base->lcpa_regulator); regulator_put(base->lcpa_regulator);
} }
pm_runtime_disable(base->dev);
report_failure: report_failure:
d40_err(dev, "probe failed\n"); d40_err(dev, "probe failed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment