]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed
authorAndy Yan <andy.yan@rock-chips.com>
Fri, 9 May 2025 03:15:59 +0000 (11:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:04:56 +0000 (12:04 +0200)
commit7b4dbe023efff3b2560edfb0aaf120d5ae9288cf
tree8c37ecab8cca482c2b250d8e0e4444ea7a19ed26
parent6f903fd7c51ff5aa7007050f4a01127223f7a579
drm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed

[ Upstream commit 099593a28138b48feea5be8ce700e5bc4565e31d ]

In the function drm_gem_fb_init_with_funcs, the framebuffer (fb)
and its corresponding object ID have already been registered.

So we need to cleanup the drm framebuffer if the subsequent
execution of drm_gem_fb_afbc_init fails.

Directly call drm_framebuffer_put to ensure that all fb related
resources are cleanup.

Fixes: 7707f7227f09 ("drm/rockchip: Add support for afbc")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250509031607.2542187-1-andyshrk@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/rockchip/rockchip_drm_fb.c