Skip to contentSkip to conversation

drm/amd/display: Initialize stack variable

PATCH New Rodrigo Siqueira 1 participant 1 message Dec 29, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Initialize stack variable

From: Wesley Chalmers <[email protected]>

The stack variable "val" is potentially unpopulate it, so initialize it with the value 0xf (indicating an invalid mux).

Cc Alex Deucher <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Harry Wentland <[email protected]>
Cc Nicholas Kazlauskas <[email protected]>
Cc Hersen Wu <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Josip Pavic <[email protected]>
Cc Bindu Ramamurthy <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c +1 -1
index a46cb20596fe..b096011acb49 100644
@@ -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);
Signature · 6 lines
2.30.0.rc2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx