drm/amd/display: Return value of function

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>
This commit is contained in:
Denis Arefev
2023-08-03 17:11:16 +03:00
committed by Alex Deucher
parent 73b0648179
commit 665fdce51b

View 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);