* [PATCH] drm/amd/display: Initialize stack variable
@ 2020-12-29 16:57 Rodrigo Siqueira
0 siblings, 0 replies; only message in thread
From: Rodrigo Siqueira @ 2020-12-29 16:57 UTC (permalink / raw)
To: LKML, dri-devel, amd-gfx
Cc: Wesley Chalmers, Alex Deucher, Alex Deucher, Harry Wentland,
Nicholas Kazlauskas, Hersen Wu, Dave Airlie, Josip Pavic,
Bindu Ramamurthy, Martin Leung
From: Wesley Chalmers <Wesley.Chalmers@amd.com>
The stack variable "val" is potentially unpopulate it, so initialize it
with the value 0xf (indicating an invalid mux).
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Josip Pavic <Josip.Pavic@amd.com>
Cc: Bindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 a46cb20596fe..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;
+ uint32_t val = 0xf;
if (opp_id < MAX_OPP && REG(MUX[opp_id]))
REG_GET(MUX[opp_id], MPC_OUT_MUX, &val);
--
2.30.0.rc2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-29 16:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 16:57 [PATCH] drm/amd/display: Initialize stack variable Rodrigo Siqueira
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®