Skip to content

Commit 592ddac

Browse files
Alex Hungalexdeucher
authored andcommitted
drm/amd/display: Initialize mode_select to 0
[WHAT] mode_select was supposed to be initialized in mpc_read_gamut_remap but is not set in default case. This can cause indeterminate behaviors. This is reported as an UNINIT error by Coverity. Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 7beee6e commit 592ddac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ void mpc401_get_gamut_remap(struct mpc *mpc,
561561
struct mpc_grph_gamut_adjustment *adjust)
562562
{
563563
uint16_t arr_reg_val[12] = {0};
564-
uint32_t mode_select;
564+
uint32_t mode_select = MPCC_GAMUT_REMAP_MODE_SELECT_0;
565565

566566
mpc_read_gamut_remap(mpc, mpcc_id, arr_reg_val, adjust->mpcc_gamut_remap_block_id, &mode_select);
567567

0 commit comments

Comments
 (0)