Message ID | 56712ad5-ed41-4d64-a317-10cc1275137a@moroto.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/amd/display: delete unnecessary check in dcn35_set_long_vblank() | expand |
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c index 2e8ec58a16eb..87cfd9f1cec9 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c @@ -1411,10 +1411,7 @@ void dcn35_set_long_vblank(struct pipe_ctx **pipe_ctx, if (pipe_ctx[i]->stream) { struct dc_crtc_timing *timing = &pipe_ctx[i]->stream->timing; - if (timing) - params.vertical_blank_start = timing->v_total - timing->v_front_porch; - else - params.vertical_blank_start = 0; + params.vertical_blank_start = timing->v_total - timing->v_front_porch; if ((pipe_ctx[i]->stream_res.tg != NULL) && pipe_ctx[i]->stream_res.tg->funcs && pipe_ctx[i]->stream_res.tg->funcs->set_long_vtotal)
"timing" is "&pipe_ctx[i]->stream->timing" where ->timing is not the first struct member of ->stream. So it's the address which points into the middle of a struct. It can't be NULL so delete the NULL check. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)