]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Remove unreachable check
authorIvan Lipski <ivlipski@amd.com>
Fri, 31 May 2024 20:31:02 +0000 (16:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:17:13 +0000 (16:17 -0400)
commit3c6ad7320b32fc5de1cd9a5b092dc1d5a3cd0348
tree9e19a2f61e3315483629133f6382beef9e5b728b
parent223ac8b6f57a60f3262453a4bd3d3366842ced0f
drm/amd/display: Remove unreachable check

[WHY]
Coverity analysis flagged this code as DEADCODE
since the condition and return in the outer loop
are never reached.

All operations with the 'dwb_pipe' variable happen
in the inner loop, that already contains the same
check with the 'MAX_DWB_PIPES'. The later
check condition cannot occur before the check
condition in the inner loop, thus the later
condition is unreacable.

[HOW]
Remove the unreachable condition.

Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Ivan Lipski <ivlipski@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c