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: Lloyd Atkinson <latkinso@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
f0efc831d9
commit
6e1787cf45
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue