diff options
author | Lloyd Atkinson <latkinso@codeaurora.org> | 2018-01-17 00:26:02 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-02-20 18:41:20 +0300 |
commit | 6e1787cf45e48866c01dadc2a1b6c3d63d75b8d1 (patch) | |
tree | a101ec20fc17cd8e869e2edc1ffb1801d45ca3fe /drivers/gpu/drm/msm/dsi/dsi_manager.c | |
parent | f0efc831d9439589efaf6406695470eca93ba08d (diff) | |
download | linux-6e1787cf45e48866c01dadc2a1b6c3d63d75b8d1.tar.xz |
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/dsi_manager.c')
-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 1a54fd67c9c4..4cb1cb68878b 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; } |