Commit 5ca8d617 authored by Yang Yingliang's avatar Yang Yingliang Committed by Zheng Zengkai
Browse files

video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()

stable inclusion
from stable-v5.10.122
commit 8b3d5bafb188ab32c5684ccc12ddf80be83eeac0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5W6OE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8b3d5bafb188ab32c5684ccc12ddf80be83eeac0



--------------------------------

[ Upstream commit d87ad457 ]

In pxa3xx_gcu_probe(), the sequence of error lable is wrong, it will
leads some resource leaked, so adjust the sequence to handle the error
correctly, and if pxa3xx_gcu_add_buffer() fails, pxa3xx_gcu_free_buffers()
need be called.
In pxa3xx_gcu_remove(), add missing clk_disable_unpreprare().

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 6a09a2d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment