From: Dembskiy Igor Date: Wed, 30 Aug 2023 14:01:03 +0000 (+0300) Subject: drm/amd/display: remove useless check in should_enable_fbc() X-Git-Tag: v6.7-rc1~145^2~10^2~424 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19d5f80128d7a197fcb465f21465c30ee4c36f25;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: remove useless check in should_enable_fbc() 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 Signed-off-by: Dembskiy Igor Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c index d0b3e29fe83ec..602fb149dc105 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c @@ -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;