summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWesley Chalmers <Wesley.Chalmers@amd.com>2020-12-14 21:35:02 +0100
committerAlex Deucher <alexander.deucher@amd.com>2021-01-14 06:18:33 +0100
commit4336be4b07ed3b03a18ac35564c3127eeea05ab6 (patch)
tree22ad7b19a122e2dcae6ba98105eddf3b09247851 /drivers
parentdrm/amd/display: NULL pointer hang (diff)
downloadlinux-4336be4b07ed3b03a18ac35564c3127eeea05ab6.tar.xz
linux-4336be4b07ed3b03a18ac35564c3127eeea05ab6.zip
drm/amd/display: Initialize stack variable
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
index 100ce0e28fd5..b096011acb49 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c
@@ -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);