]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: avoid using null object of framebuffer
authorJulia Zhang <julia.zhang@amd.com>
Mon, 3 Jun 2024 11:31:09 +0000 (19:31 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2024 21:10:39 +0000 (17:10 -0400)
commit79ea35c7d84b73733ee5281a089168e71d0168d7
treeda2a134b4f5c55edcd7a1a669a7fb4550cae0b63
parentbdbdc7cecd00305dc844a361f9883d3a21022027
drm/amdgpu: avoid using null object of framebuffer

Instead of using state->fb->obj[0] directly, get object from framebuffer
by calling drm_gem_fb_get_obj() and return error code when object is
null to avoid using null object of framebuffer.

Reported-by: Fusheng Huang <fusheng.huang@ecarxgroup.com>
Signed-off-by: Julia Zhang <Julia.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c