drm/edid: fix length check when adding extra 3D modes

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Thomas Wood 2013-11-29 15:33:26 +00:00 committed by Dave Airlie
parent 1ec2c7fc11
commit 7d14b95f1a
1 changed files with 1 additions and 1 deletions

View File

@ -2674,7 +2674,7 @@ static int add_3d_struct_modes(struct drm_connector *connector, u16 structure,
int modes = 0;
u8 cea_mode;
if (video_db == NULL || video_index > video_len)
if (video_db == NULL || video_index >= video_len)
return 0;
/* CEA modes are numbered 1..127 */