Skip to content

Commit

Permalink
dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
Browse files Browse the repository at this point in the history
[ Upstream commit 0618c07 ]

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>
  • Loading branch information
ZhangShurong authored and gregkh committed Nov 8, 2023
1 parent f4ba1dc commit 3b6a417
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -3678,6 +3678,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);
Expand Down

0 comments on commit 3b6a417

Please sign in to comment.