From eb2aff477dffb5e5c554139acf1ac8da22fae79e Mon Sep 17 00:00:00 2001 From: Zhang Yubing Date: Wed, 25 Dec 2024 14:43:21 +0800 Subject: [PATCH] drm/rockchip: vop2: initialize the convert_mode and csc_coef before use If the value of covert_mode and csc_coef not initialize, the compile will assign a default value which may be different by different compiles. It should initialize their default value explicitly before use. Fixes: c08d820f80b8 ("drm/rockchip: vop2: Support post csc color range convert") Change-Id: I39be672d6f8fda8fdf8298eafe140f449da32e46 Signed-off-by: Zhang Yubing --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index 25f3879a46b0..aaa0f853464d 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -11659,8 +11659,8 @@ static void vop3_post_csc_config(struct drm_crtc *crtc, struct post_acm *acm, st struct vop2 *vop2 = vp->vop2; struct drm_plane *plane; struct drm_plane_state *pstate; - struct post_csc_coef csc_coef; - struct post_csc_convert_mode convert_mode; + struct post_csc_coef csc_coef = {}; + struct post_csc_convert_mode convert_mode = {}; bool acm_enable; bool post_r2y_en = false; bool post_csc_en = false;