]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: remove redundant assignment to variable ret
authorColin Ian King <colin.king@canonical.com>
Thu, 23 Apr 2020 14:17:28 +0000 (15:17 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 Apr 2020 15:42:11 +0000 (11:42 -0400)
The variable ret 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.

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_dp.c

index a87302f729c77032c413a3153b62c25173279466..f9fa0f7712b3d33df673e0b9cd87275d15e4ca8f 100644 (file)
@@ -4231,7 +4231,7 @@ void dpcd_set_source_specific_data(struct dc_link *link)
 {
        const uint32_t post_oui_delay = 30; // 30ms
        uint8_t dspc = 0;
-       enum dc_status ret = DC_ERROR_UNEXPECTED;
+       enum dc_status ret;
 
        ret = core_link_read_dpcd(link, DP_DOWN_STREAM_PORT_COUNT, &dspc,
                                  sizeof(dspc));