[PATCH 24/26] drm/amd/display: Initialize replay_config var

Rodrigo Siqueira Rodrigo.Siqueira at amd.com
Thu Oct 3 23:33:42 UTC 2024


From: Kaitlyn Tse <Kaitlyn.Tse at amd.com>

[Why]
Uninitialized variables could cause some bits to be set, thus enabling
features unintentionally.

[How]
Initialize replay_config variable to avoid future issues.

Reviewed-by: Harry Vanzylldejong <harry.vanzylldejong at amd.com>
Reviewed-by: Iswara Nagulendran <iswara.nagulendran at amd.com>
Reviewed-by: Anthony Koo <anthony.koo at amd.com>
Signed-off-by: Kaitlyn Tse <Kaitlyn.Tse at amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira at amd.com>
---
 .../drm/amd/display/dc/link/protocols/link_edp_panel_control.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
index 7680bc8845d4..cbea36916d35 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
@@ -938,8 +938,7 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream
 	struct replay_context replay_context = { 0 };
 	unsigned int lineTimeInNs = 0;
 
-
-	union replay_enable_and_configuration replay_config;
+	union replay_enable_and_configuration replay_config = { 0 };
 
 	union dpcd_alpm_configuration alpm_config;
 
-- 
2.45.2



More information about the amd-gfx mailing list