Commit 6e1787cf authored by Lloyd Atkinson's avatar Lloyd Atkinson Committed by 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: default avatarLloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent f0efc831
......@@ -862,7 +862,7 @@ int msm_dsi_manager_register(struct msm_dsi *msm_dsi)
int id = msm_dsi->id;
int ret;
if (id > DSI_MAX) {
if (id >= DSI_MAX) {
pr_err("%s: invalid id %d\n", __func__, id);
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment