提交 5842ab76 编写于 作者: D Dan Carpenter 提交者: Daniel Vetter

drm: xlnx: zynqmp: fix a memset in zynqmp_dp_train()

The dp->train_set[] for this driver is only two characters, not four so
this memsets too much.  Fortunately, this ends up corrupting a struct
hole and not anything important.

Fixes: d76271d2 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NMichal Simek <michal.simek@xilinx.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/YGLwCBMotnrKZu6P@mwanda
上级 be54ffe0
......@@ -866,7 +866,7 @@ static int zynqmp_dp_train(struct zynqmp_dp *dp)
return ret;
zynqmp_dp_write(dp, ZYNQMP_DP_SCRAMBLING_DISABLE, 1);
memset(dp->train_set, 0, 4);
memset(dp->train_set, 0, sizeof(dp->train_set));
ret = zynqmp_dp_link_train_cr(dp);
if (ret)
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册