drm/amd/display: Return value of function
authorDenis Arefev <arefev@swemel.ru>
Thu, 3 Aug 2023 14:11:16 +0000 (17:11 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Aug 2023 13:39:52 +0000 (09:39 -0400)
Added return value check hpd_enable

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c

index fa314493ffc50050fe5d775bb47bdcf4837eaa74..bf2f620aeb66443ba2cfcb53aac02994f111f806 100644 (file)
@@ -1645,7 +1645,7 @@ void dce110_link_encoder_enable_hpd(struct link_encoder *enc)
        uint32_t hpd_enable = 0;
        uint32_t value = dm_read_reg(ctx, addr);
 
-       get_reg_field_value(hpd_enable, DC_HPD_CONTROL, DC_HPD_EN);
+       hpd_enable = get_reg_field_value(hpd_enable, DC_HPD_CONTROL, DC_HPD_EN);
 
        if (hpd_enable == 0)
                set_reg_field_value(value, 1, DC_HPD_CONTROL, DC_HPD_EN);