Skip to content

Commit

Permalink
drm: mali-dp: Uninitialized variable in malidp_se_check_scaling()
Browse files Browse the repository at this point in the history
We use "mc" without initializing it if scaling is not necessary.

Fixes: 28ce675 ("drm: mali-dp: Add plane upscaling support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mihail Atanassov <Mihail.Atanassov@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
  • Loading branch information
Dan Carpenter authored and Liviu Dudau committed Mar 14, 2018
1 parent 5ed4fdf commit f2f2c85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/arm/malidp_planes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down

0 comments on commit f2f2c85

Please sign in to comment.