drm/amd/display: Remove redundant initialization of variable eng_id
authorColin Ian King <colin.king@canonical.com>
Fri, 6 Aug 2021 11:16:15 +0000 (12:16 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Aug 2021 20:12:27 +0000 (16:12 -0400)
The variable eng_id is being initialized with a value that is never
read, it is being re-assigned on the next statment. 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_enc_cfg.c

index 1a89d565c92e542e48312c89f9c9e9864d580163..de80a9ea4cfaae20bbcd5e0b27ddcb015b8977a0 100644 (file)
@@ -305,7 +305,7 @@ struct link_encoder *link_enc_cfg_get_next_avail_link_enc(
        const struct dc_state *state)
 {
        struct link_encoder *link_enc = NULL;
-       enum engine_id eng_id = ENGINE_ID_UNKNOWN;
+       enum engine_id eng_id;
 
        eng_id = find_first_avail_link_enc(dc->ctx, state);
        if (eng_id != ENGINE_ID_UNKNOWN)