[PATCH][next] drm/amd/display: remove redundant initialization of variable status
Colin King
colin.king at canonical.com
Wed Mar 31 13:37:36 UTC 2021
From: Colin Ian King <colin.king at canonical.com>
The variable status is being initialized with a value that is
never read and it is being updated later with a new value.
The initialization is redundant and can be removed. Also clean
up an indentation.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index b092627bd661..4c226db777dc 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1729,12 +1729,11 @@ bool perform_link_training_with_retries(
dc_link_dp_perform_link_training_skip_aux(link, link_setting);
return true;
} else {
- enum link_training_result status = LINK_TRAINING_CR_FAIL_LANE0;
+ enum link_training_result status;
- status = dc_link_dp_perform_link_training(
- link,
- link_setting,
- skip_video_pattern);
+ status = dc_link_dp_perform_link_training(link,
+ link_setting,
+ skip_video_pattern);
if (status == LINK_TRAINING_SUCCESS)
return true;
}
--
2.30.2
More information about the dri-devel
mailing list