From: Bas Nieuwenhuizen Date: Wed, 16 May 2018 00:40:23 +0000 (+0200) Subject: drm/amd: Init modifier field of helper fb. X-Git-Tag: io_uring-5.11-2020-12-23~116^2~12^2~78 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=53f4cb8b5580a20d01449a7d8e1cbfdaed9ff6b6;p=linux-2.6-block.git drm/amd: Init modifier field of helper fb. Otherwise the field ends up being used uninitialized when enabling modifiers, failing validation with high likelyhood. v4: Use memset Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher (for v1) Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c index e2c2eb45a793..0bf7d36c6686 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c @@ -207,6 +207,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper, int ret; unsigned long tmp; + memset(&mode_cmd, 0, sizeof(mode_cmd)); mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height;