]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: Remove redundant initialization of variable result
authorColin Ian King <colin.king@canonical.com>
Thu, 7 Oct 2021 12:06:37 +0000 (13:06 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Oct 2021 17:20:13 +0000 (13:20 -0400)
The variable result is being initialized with a value that is never
read, it is being updated immediately afterwards in both branches
of an if statement. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c

index 6936b9d549e57a95991ccd15db66b3cf10203288..8387767ec1b3577137f7b7574af00ffb886069ab 100644 (file)
@@ -774,7 +774,7 @@ static enum link_training_result dpia_training_eq_phase(struct dc_link *link,
                struct link_training_settings *lt_settings,
                uint32_t hop)
 {
-       enum link_training_result result = LINK_TRAINING_EQ_FAIL_EQ;
+       enum link_training_result result;
 
        if (link->lttpr_mode == LTTPR_MODE_NON_TRANSPARENT)
                result = dpia_training_eq_non_transparent(link, lt_settings, hop);