Commit 08b66279 authored by Martin Leung's avatar Martin Leung Committed by Alex Deucher

drm/amd/display: fix use of uninitialized variable

tg_inst may be used uninitialized, so initialize it to 0.
Signed-off-by: default avatarMartin Leung <martin.leung@amd.com>
Reviewed-by: default avatarJaehyun Chung <Jaehyun.Chung@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0fc3ba1c
......@@ -974,7 +974,7 @@ bool dc_validate_seamless_boot_timing(const struct dc *dc,
{
struct timing_generator *tg;
struct dc_link *link = sink->link;
unsigned int enc_inst, tg_inst, i;
unsigned int i, enc_inst, tg_inst = 0;
// Seamless port only support single DP and EDP so far
if (sink->sink_signal != SIGNAL_TYPE_DISPLAY_PORT &&
......
......@@ -1848,7 +1848,7 @@ static int acquire_resource_from_hw_enabled_state(
struct dc_stream_state *stream)
{
struct dc_link *link = stream->link;
unsigned int inst, tg_inst, i;
unsigned int i, inst, tg_inst = 0;
/* Check for enabled DIG to identify enabled display */
if (!link->link_enc->funcs->is_dig_enabled(link->link_enc))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment