]> www.infradead.org Git - users/hch/block.git/commit
drm/fb_dma: Add checks in drm_fb_dma_get_scanout_buffer()
authorJocelyn Falempe <jfalempe@redhat.com>
Fri, 26 Apr 2024 12:10:50 +0000 (14:10 +0200)
committerJocelyn Falempe <jfalempe@redhat.com>
Tue, 30 Apr 2024 14:25:46 +0000 (16:25 +0200)
commit986c12d8c9a677c094c37bd6aa636b4d4c5ccd46
tree738d17cbd6a832c7b5390413a7af060adc25ec5d
parent4a9a567ab101e659a4fafb7a691ff6b84531a10a
drm/fb_dma: Add checks in drm_fb_dma_get_scanout_buffer()

plane->state and plane->state->fb can be NULL, so add a check before
dereferencing them.
Found by testing with the imx driver.

Fixes: 879b3b6511fe ("drm/fb_dma: Add generic get_scanout_buffer() for drm_panic")
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240426121121.241366-1-jfalempe@redhat.com
drivers/gpu/drm/drm_fb_dma_helper.c