Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5be477e1 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: fix potential array index out of bounds"

parents 24b4452d 716746da
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1591,7 +1591,8 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
		/* update display cap to MST_MODE for DP MST encoders */
		/* update display cap to MST_MODE for DP MST encoders */
		info.capabilities |= MSM_DISPLAY_CAP_MST_MODE;
		info.capabilities |= MSM_DISPLAY_CAP_MST_MODE;
		sde_kms->dp_stream_count = dp_display_get_num_of_streams();
		sde_kms->dp_stream_count = dp_display_get_num_of_streams();
		for (idx = 0; idx < sde_kms->dp_stream_count; idx++) {
		for (idx = 0; idx < sde_kms->dp_stream_count &&
			priv->num_encoders < max_encoders; idx++) {
			info.h_tile_instance[0] = idx;
			info.h_tile_instance[0] = idx;
			encoder = sde_encoder_init(dev, &info);
			encoder = sde_encoder_init(dev, &info);
			if (IS_ERR_OR_NULL(encoder)) {
			if (IS_ERR_OR_NULL(encoder)) {