]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Remove redundant non-zero and overflow check
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>
Wed, 1 Aug 2018 14:20:53 +0000 (10:20 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:10:16 +0000 (11:10 -0500)
commit7c0bccc05fa699bca72fc4b723151bf2df6762bc
tree268645cc3462fcf33c1d3fdc3317a3ec71e47cbc
parentf4c5dc7912119c699e49d5d7959aa52fd55146ca
drm/amd/display: Remove redundant non-zero and overflow check

[Why]
Unsigned int is guaranteed to be >= 0, and read_channel_reply checks for
overflows. read_channel_reply also returns -1 on error, which is what
dc_link_aux_transfer is expected to return on error.

[How]
Remove the if-statement. Return result of read_channel_reply directly.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c