drm/edid: fix length check when adding extra 3D modes
authorThomas Wood <thomas.wood@intel.com>
Fri, 29 Nov 2013 15:33:26 +0000 (15:33 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 5 Dec 2013 01:00:51 +0000 (11:00 +1000)
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>
drivers/gpu/drm/drm_edid.c

index fb7cf0e796f668328e7a923dbcada92ba8c2f1c7..381c698e8a3e2558101bdff043b20c1eea3d91e0 100644 (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 */