diff options
author | Yi Yang <yiyang13@huawei.com> | 2022-12-16 13:23:18 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-01-10 01:02:18 +0300 |
commit | b95cb0d852014ded7d718953322f0ac6084dd661 (patch) | |
tree | 02e1aefaee1c9abd9c09f4fc5ec034b2367816fc /drivers/gpu/drm/amd/display/dc/core | |
parent | 13b90cf900ab69dd5cab3cc5035bc7614037e64e (diff) | |
download | linux-b95cb0d852014ded7d718953322f0ac6084dd661.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c index 9825c30f2ca0..72b261ad9587 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c @@ -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) { |