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)
committerHelge Deller <deller@gmx.de>
Thu, 19 May 2022 09:36:16 +0000 (11:36 +0200)
commitd87ad457f7e1b8d2492ca5b1531eb35030a1cc8f
tree11ef1e3749e15643693553ba7934328354cc9f0c
parent40189b7368e509b21cf68f8a6c1aa6c6cdb01561
video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove()

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>
drivers/video/fbdev/pxa3xx-gcu.c