From: Ivan Lipski Date: Wed, 18 Feb 2026 21:19:15 +0000 (-0500) Subject: drm/amd/display: Initialize replay_state to PR_STATE_INVALID X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aef8c3253e9d2f476765b76c3d0c6031b2a5b042;p=thirdparty%2Flinux.git drm/amd/display: Initialize replay_state to PR_STATE_INVALID [WHY & HOW] Initialize the replay_state variable to PR_STATE_INVALID instead of PR_STATE_0 before retrieving the actual replay state. Reviewed-by: Wenjing Liu Signed-off-by: Ivan Lipski Signed-off-by: Alex Hung Tested-by: Dan Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c index 7e45d1e767bb1..6661078c0241f 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c @@ -389,7 +389,7 @@ bool dp_pr_get_state(const struct dc_link *link, uint64_t *state) const struct dc *dc = link->ctx->dc; unsigned int panel_inst = 0; uint32_t retry_count = 0; - uint32_t replay_state = 0; + uint32_t replay_state = PR_STATE_INVALID; if (!dp_pr_get_panel_inst(dc, link, &panel_inst)) return false;