diff options
author | Zhang Shurong <zhang_shurong@foxmail.com> | 2023-10-05 22:28:35 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-08 17:30:48 +0100 |
commit | fb8f253b953282e6087f9ddd916b8d89061af904 (patch) | |
tree | cff3d9f33674bebfa5b5f6c3ce3dd59e8d9fdb79 | |
parent | e619b38a873fc92239d5f65c417d362c099c0e19 (diff) | |
download | linux-stable-fb8f253b953282e6087f9ddd916b8d89061af904.tar.gz linux-stable-fb8f253b953282e6087f9ddd916b8d89061af904.tar.bz2 linux-stable-fb8f253b953282e6087f9ddd916b8d89061af904.zip |
dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
[ Upstream commit 0618c077a8c20e8c81e367988f70f7e32bb5a717 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/dma/ste_dma40.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index d99fec821508..4c306dd13e86 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3698,6 +3698,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); kfree(base->lcla_pool.alloc_map); kfree(base->lookup_log_chans); |