提交 53f4cb8b 编写于 作者: B Bas Nieuwenhuizen 提交者: Alex Deucher

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: NBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
(for v1)
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 b35ce7b3
...@@ -207,6 +207,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper, ...@@ -207,6 +207,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
int ret; int ret;
unsigned long tmp; unsigned long tmp;
memset(&mode_cmd, 0, sizeof(mode_cmd));
mode_cmd.width = sizes->surface_width; mode_cmd.width = sizes->surface_width;
mode_cmd.height = sizes->surface_height; mode_cmd.height = sizes->surface_height;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册