OSDN Git Service

drm/amd/display: Remove redundant assignment to variable dc
authorYi Yang <yiyang13@huawei.com>
Fri, 16 Dec 2022 10:23:18 +0000 (18:23 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Jan 2023 22:02:18 +0000 (17:02 -0500)
commitb95cb0d852014ded7d718953322f0ac6084dd661
tree02e1aefaee1c9abd9c09f4fc5ec034b2367816fc
parent13b90cf900ab69dd5cab3cc5035bc7614037e64e
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: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Yi Yang <yiyang13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c