From: Tales Lelo da Aparecida Date: Fri, 15 Apr 2022 11:12:59 +0000 (-0300) Subject: drm/vkms: check plane_composer->map[0] before using it X-Git-Tag: v6.1-rc5~617^2~22^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24f6fe3226c6f9f1b8406311a96b59c6e650b707;p=platform%2Fkernel%2Flinux-starfive.git drm/vkms: check plane_composer->map[0] before using it Fix a copypasta error. The caller of compose_plane() already checks primary_composer->map. In contrast, plane_composer->map is never verified here before handling. Fixes: 7938f4218168 ("dma-buf-map: Rename to iosys-map") Reviewed-by: André Almeida Signed-off-by: Tales Lelo da Aparecida Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20220415111300.61013-2-tales.aparecida@gmail.com --- diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c index 914c0ac..0f5655f 100644 --- a/drivers/gpu/drm/vkms/vkms_composer.c +++ b/drivers/gpu/drm/vkms/vkms_composer.c @@ -157,7 +157,7 @@ static void compose_plane(struct vkms_composer *primary_composer, void *vaddr; void (*pixel_blend)(const u8 *p_src, u8 *p_dst); - if (WARN_ON(iosys_map_is_null(&primary_composer->map[0]))) + if (WARN_ON(iosys_map_is_null(&plane_composer->map[0]))) return; vaddr = plane_composer->map[0].vaddr;