]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix the return of the uninitialized value in ret
authorColin Ian King <colin.king@canonical.com>
Tue, 2 Mar 2021 14:05:09 +0000 (14:05 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Mar 2021 04:05:16 +0000 (23:05 -0500)
commit96e913a120c56e1c23bc9ad85e44c0b6a8c5d589
tree0c3f0f7cd301ea525ff94242e68368d21fc7eba9
parent762b5df0d467c91e8caaf69f05e056f59decdd03
drm/amd/display: fix the return of the uninitialized value in ret

Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or
SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is
checked for > 0 at the end of the function.  Ret should be initialized,
I believe setting it to zero is a correct default.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 7c894119f1ee ("drm/amd/display: Add return code instead of boolean for future use")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c