diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-12-09 14:46:13 +0300 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2018-03-14 14:38:02 +0300 |
commit | f2f2c85c66202edcb623626b3babce7850d8b4fb (patch) | |
tree | 45711b09c537fb7961c70d6b36a3ba355ce31b7c /drivers/gpu/drm/arm/malidp_planes.c | |
parent | 5ed4fdfa58f091a65cb533cc6b8f47ade4cc4475 (diff) | |
download | linux-f2f2c85c66202edcb623626b3babce7850d8b4fb.tar.xz |
drm: mali-dp: Uninitialized variable in malidp_se_check_scaling()
We use "mc" without initializing it if scaling is not necessary.
Fixes: 28ce675b7474 ("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>
Diffstat (limited to 'drivers/gpu/drm/arm/malidp_planes.c')
-rw-r--r-- | drivers/gpu/drm/arm/malidp_planes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index a307fc2f2abc..6f813c4c187d 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -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; |