提交 6e1787cf 编写于 作者: L Lloyd Atkinson 提交者: Rob Clark

drm/msm/dsi: correct DSI id bounds check during registration

Check DSI instance id argument against the proper boundary size
to protect against invalid configuration of the DSI id.
Signed-off-by: NLloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: NRob Clark <robdclark@gmail.com>
上级 f0efc831
...@@ -862,7 +862,7 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi) ...@@ -862,7 +862,7 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
int id = msm_dsi->id; int id = msm_dsi->id;
int ret; int ret;
if (id > DSI_MAX) { if (id >= DSI_MAX) {
pr_err("%s: invalid id %d\n", __func__, id); pr_err("%s: invalid id %d\n", __func__, id);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册