]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/display: Remove unnecessary variable
authorIvan Lipski <ivlipski@amd.com>
Fri, 31 May 2024 20:54:24 +0000 (16:54 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2024 21:10:36 +0000 (17:10 -0400)
commitc6dfe8f20b00d0ac6addc0024d4c70693e78e7cd
tree6619d275595ee205e8466982c6015f89e8983550
parent9da0f7736763aa0fbf63bb15060c6827135f3f67
drm/amd/display: Remove unnecessary variable

[WHY]
Coverity analysis flagged this code as DEADCODE because
the condition '(!need_recovery)' is never true.

The variable 'need_recovery' is initialized as 'true',
is not assigned to 'false' anywhere before the
conditional statement.

Since the variable is only used for the conditional check,
but the check can never be true, the variable itself is
redundant.

[HOW]
Removed the variable 'need_recovery'.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Hung <alex.hung@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/hwss/dcn10/dcn10_hwseq.c