diff options
author | Martin Leung <martin.leung@amd.com> | 2019-09-03 15:22:30 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-10-03 09:10:57 -0500 |
commit | 08b662793b90fc3a7e1d84d0fe0a5c04112731fd (patch) | |
tree | 0fe990f7efd21d83b0176305f1e543c2c04a5e63 /drivers/gpu/drm/amd/display/dc/core | |
parent | 0fc3ba1c53bcc739ef2746f2fb3e82bb5f7a69f5 (diff) | |
download | linux-stable-08b662793b90fc3a7e1d84d0fe0a5c04112731fd.tar.gz linux-stable-08b662793b90fc3a7e1d84d0fe0a5c04112731fd.tar.bz2 linux-stable-08b662793b90fc3a7e1d84d0fe0a5c04112731fd.zip |
drm/amd/display: fix use of uninitialized variable
tg_inst may be used uninitialized, so initialize it to 0.
Signed-off-by: Martin Leung <martin.leung@amd.com>
Reviewed-by: Jaehyun Chung <Jaehyun.Chung@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index d5249814bea2..098752059064 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -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 && diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 215e93aa63a7..25da0c45d828 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -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)) |