summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorWayne Lin <Wayne.Lin@amd.com>2021-10-08 15:08:37 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-10-08 13:20:14 -0400
commit097cbf2648e08ef7f24d484ce576902d6f86af42 (patch)
treeee818015d51fb1b95eaaa98d86922e59c4053df9 /drivers/gpu/drm/amd
parent35bdf463de33fbf0e04a9f86b15e4276697e5d66 (diff)
downloadlinux-097cbf2648e08ef7f24d484ce576902d6f86af42.tar.gz
linux-097cbf2648e08ef7f24d484ce576902d6f86af42.tar.bz2
linux-097cbf2648e08ef7f24d484ce576902d6f86af42.zip
drm/amd/display: Fix Werror when building
[Why & How] Got Werror when building with Clang-13: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpia.c:195:2: error: variable 'ts' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpia.c:200:9: note: uninitialized use occurs here return ts; ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpia.c:180:2: note: variable 'ts' is declared here enum dpia_set_config_ts ts; ^ 1 error generated. Fix it. Reported-by: Mike Lothian <mike@fireburn.co.uk> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c
index 8387767ec1b3..8971d7af8113 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c
@@ -193,6 +193,7 @@ static enum dpia_set_config_ts convert_trng_ptn_to_trng_stg(enum dc_dp_training_
ts = DPIA_TS_TPS4;
break;
default:
+ ts = DPIA_TS_DPRX_DONE;
ASSERT(false); /* TPS not supported by helper function. */
break;
}