Commit b95cb0d8 authored by Yi Yang's avatar Yi Yang Committed by Alex Deucher

drm/amd/display: Remove redundant assignment to variable dc

Smatch report warning as follows:

Line 53679: drivers/gpu/drm/amd/display/dc/core/dc_stream.c:402
dc_stream_set_cursor_position() warn: variable dereferenced before
check 'stream'

The value of 'dc' has been assigned after check whether 'stream' is
NULL. Fix it by remove redundant assignment.
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 13b90cf9
......@@ -408,7 +408,7 @@ bool dc_stream_set_cursor_position(
struct dc_stream_state *stream,
const struct dc_cursor_position *position)
{
struct dc *dc = stream->ctx->dc;
struct dc *dc;
bool reset_idle_optimizations = false;
if (NULL == stream) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment