drm/amd/display: remove useless check in should_enable_fbc()
authorDembskiy Igor <dii@itb.spb.ru>
Wed, 30 Aug 2023 14:01:03 +0000 (17:01 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Sep 2023 18:31:17 +0000 (14:31 -0400)
It does not make sense to compare a pointer to array element with NULL.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 65d38262b3e8 ("drm/amd/display: fbc state could not reach while enable fbc")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Dembskiy Igor <dii@itb.spb.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index d0b3e29fe83ec8ba04e6192109936773eacb80d6..602fb149dc1053ebe739e18f69611a9eb1f8c06d 100644 (file)
@@ -1997,9 +1997,6 @@ static bool should_enable_fbc(struct dc *dc,
 
                        pipe_ctx = &res_ctx->pipe_ctx[i];
 
-                       if (!pipe_ctx)
-                               continue;
-
                        /* fbc not applicable on underlay pipe */
                        if (pipe_ctx->pipe_idx != underlay_idx) {
                                *pipe_idx = i;