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

Commit 60da7263 authored by Shubhashree Dhar's avatar Shubhashree Dhar
Browse files

drm/msm: Fix uninitialization and out of bound access issues



Fix uninitialised variables in encoder structure and
out of bound array access in framebuffer init.

Change-Id: I416f5e8708cfb3a4c7aa1fd25c429d9f49cf97e0
Signed-off-by: default avatarShubhashree Dhar <dhar@codeaurora.org>
parent 0bb81cfe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -501,7 +501,7 @@ static void msm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
			funcs->commit(encoder);
	}

	if (kms->funcs->commit) {
	if (kms && kms->funcs && kms->funcs->commit) {
		DRM_DEBUG_ATOMIC("triggering commit\n");
		kms->funcs->commit(kms, old_state);
	}
+1 −1
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ struct drm_framebuffer *msm_framebuffer_init(struct drm_device *dev,
		}
	}

	if (num_planes > ARRAY_SIZE(msm_fb->planes)) {
	if (num_planes > ARRAY_SIZE(msm_fb->planes) - 1) {
		ret = -EINVAL;
		goto fail;
	}
+1 −1
Original line number Diff line number Diff line
@@ -3822,7 +3822,7 @@ static void _sde_encoder_update_master(struct drm_encoder *drm_enc,

	for (i = 0; i < sde_enc->num_phys_encs; i++) {
		enum sde_enc_split_role prv_role, new_role;
		bool active;
		bool active = false;

		phys = sde_enc->phys_encs[i];
		if (!phys || !phys->ops.update_split_role || !phys->hw_pp)
+1 −1
Original line number Diff line number Diff line
@@ -526,7 +526,7 @@ static void sde_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
	u32 reset_status = 0;
	int new_cnt = -1, old_cnt = -1;
	u32 event = 0;
	int pend_ret_fence_cnt;
	int pend_ret_fence_cnt = 0;

	if (!phys_enc)
		return;