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

Commit 6575366a authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

disp: msm: sde: fix possible null pointer dereference



Fix a possible uninitialized variable usage in sde
catalog and a null pointer dereference in sde crtc.

Change-Id: I4299ade65fa7cf5bfc3d60d6d7a368d523286626
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent e2f98dc7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1299,7 +1299,8 @@ static void _sde_crtc_set_src_split_order(struct drm_crtc *crtc,
		prv_pstate = (i > 0) ? &pstates[i - 1] : NULL;
		cur_pstate = &pstates[i];
		nxt_pstate = ((i + 1) < cnt) ? &pstates[i + 1] : NULL;
		prev_layout = prv_pstate->sde_pstate->layout;
		prev_layout = prv_pstate ? prv_pstate->sde_pstate->layout :
							SDE_LAYOUT_NONE;
		cur_layout = cur_pstate->sde_pstate->layout;

		if ((!prv_pstate) || (prv_pstate->stage != cur_pstate->stage)
+1 −0
Original line number Diff line number Diff line
@@ -3010,6 +3010,7 @@ static int sde_vdc_parse_dt(struct device_node *np,
		rc = 0;
	} else {
		SDE_ERROR("invalid vdc configuration\n");
		goto end;
	}

	rc = _read_dt_entry(np, vdc_prop, ARRAY_SIZE(vdc_prop), prop_count,