diff options
author | Lloyd Atkinson <latkinso@codeaurora.org> | 2018-01-16 16:26:02 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-02-20 10:41:20 -0500 |
commit | 6e1787cf45e48866c01dadc2a1b6c3d63d75b8d1 (patch) | |
tree | a101ec20fc17cd8e869e2edc1ffb1801d45ca3fe /drivers/gpu/drm/msm/dsi | |
parent | f0efc831d9439589efaf6406695470eca93ba08d (diff) | |
download | op-kernel-dev-6e1787cf45e48866c01dadc2a1b6c3d63d75b8d1.zip op-kernel-dev-6e1787cf45e48866c01dadc2a1b6c3d63d75b8d1.tar.gz |
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>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index 1a54fd6..4cb1cb6 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -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; } |