video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 13 May 2022 10:05:41 +0000 (18:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:15 +0000 (18:36 +0200)
commitca02b9675532b464b4702af68cfda7ac13b91010
tree43b063abd2cd88d0f6e075ef1434511a510d932e
parente4cf9982ff3e15570c237f48a68025b9888554e5
video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()

[ Upstream commit d87ad457f7e1b8d2492ca5b1531eb35030a1cc8f ]

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: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/pxa3xx-gcu.c