]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
drm/amd/display: Initialize stack variable
authorWesley Chalmers <Wesley.Chalmers@amd.com>
Mon, 14 Dec 2020 20:35:02 +0000 (15:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Jan 2021 05:18:33 +0000 (00:18 -0500)
[WHY]
The stack variable "val" is potentially unpopulate it, so initialize it
with the value 0xf (indicating an invalid mux)

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c

index 100ce0e28fd5ab40c85caccf96e86a4f95bc00bf..b096011acb490fff2016c154c2ccd20f723b0479 100644 (file)
@@ -470,7 +470,7 @@ void mpc1_cursor_lock(struct mpc *mpc, int opp_id, bool lock)
 unsigned int mpc1_get_mpc_out_mux(struct mpc *mpc, int opp_id)
 {
        struct dcn10_mpc *mpc10 = TO_DCN10_MPC(mpc);
-       uint32_t val = 0;
+       uint32_t val = 0xf;
 
        if (opp_id < MAX_OPP && REG(MUX[opp_id]))
                REG_GET(MUX[opp_id], MPC_OUT_MUX, &val);