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

Commit f2f2c85c authored by Dan Carpenter's avatar Dan Carpenter Committed by Liviu Dudau
Browse files

drm: mali-dp: Uninitialized variable in malidp_se_check_scaling()



We use "mc" without initializing it if scaling is not necessary.

Fixes: 28ce675b ("drm: mali-dp: Add plane upscaling support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMihail Atanassov <Mihail.Atanassov@arm.com>
Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
parent 5ed4fdfa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -147,6 +147,8 @@ static int malidp_se_check_scaling(struct malidp_plane *mp,
	if (!crtc_state)
		return -EINVAL;

	mc = to_malidp_crtc_state(crtc_state);

	ret = drm_atomic_helper_check_plane_state(state, crtc_state,
						  0, INT_MAX, true, true);
	if (ret)
@@ -163,8 +165,6 @@ static int malidp_se_check_scaling(struct malidp_plane *mp,
	if (mp->layer->id & (DE_SMART | DE_GRAPHICS2))
		return -EINVAL;

	mc = to_malidp_crtc_state(crtc_state);

	mc->scaled_planes_mask |= mp->layer->id;
	/* Defer scaling requirements calculation to the crtc check. */
	return 0;