mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 12:55:24 -04:00
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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user