Commit 0549c62b authored by Andy Yan's avatar Andy Yan Committed by Greg Kroah-Hartman
Browse files

drm/rockchip: cleanup fb when drm_gem_fb_afbc_init failed



[ Upstream commit 099593a2 ]

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: 7707f722 ("drm/rockchip: Add support for afbc")
Signed-off-by: default avatarAndy Yan <andy.yan@rock-chips.com>
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250509031607.2542187-1-andyshrk@163.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 765cfb0d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment