|
@@ -1264,7 +1264,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
|
|
|
switch (crev) {
|
|
|
case 1:
|
|
|
tv_info = (ATOM_ANALOG_TV_INFO *)(mode_info->atom_context->bios + data_offset);
|
|
|
- if (index > MAX_SUPPORTED_TV_TIMING)
|
|
|
+ if (index >= MAX_SUPPORTED_TV_TIMING)
|
|
|
return false;
|
|
|
|
|
|
mode->crtc_htotal = le16_to_cpu(tv_info->aModeTimings[index].usCRTC_H_Total);
|
|
@@ -1302,7 +1302,7 @@ bool radeon_atom_get_tv_timings(struct radeon_device *rdev, int index,
|
|
|
break;
|
|
|
case 2:
|
|
|
tv_info_v1_2 = (ATOM_ANALOG_TV_INFO_V1_2 *)(mode_info->atom_context->bios + data_offset);
|
|
|
- if (index > MAX_SUPPORTED_TV_TIMING_V1_2)
|
|
|
+ if (index >= MAX_SUPPORTED_TV_TIMING_V1_2)
|
|
|
return false;
|
|
|
|
|
|
dtd_timings = &tv_info_v1_2->aModeTimings[index];
|