aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-07-13 14:33:37 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-07-18 16:42:39 -0400
commit2d04559e0660cf503d4e46cfbd7421d0b6156aa1 (patch)
tree96cd9efa0d4339d8c35a20f42772da3403493dce /drivers/gpu/drm/amd
parentdrm/amdgpu: Clarify asics naming in Kconfig options (diff)
downloadlinux-dev-2d04559e0660cf503d4e46cfbd7421d0b6156aa1.tar.xz
linux-dev-2d04559e0660cf503d4e46cfbd7421d0b6156aa1.zip
drm/amd/display: Remove unnecessary NULL check in commit_planes_for_stream()
Smatch complains that: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3369 commit_planes_for_stream() warn: variable dereferenced before check 'stream' (see line 3114) The 'stream' pointer cannot be NULL and the check can be removed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 51c9563ad137..e42f44fc1c08 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3478,7 +3478,7 @@ static void commit_planes_for_stream(struct dc *dc,
top_pipe_to_program->stream_res.tg,
CRTC_STATE_VACTIVE);
- if (stream && should_use_dmub_lock(stream->link)) {
+ if (should_use_dmub_lock(stream->link)) {
union dmub_hw_lock_flags hw_locks = { 0 };
struct dmub_hw_lock_inst_flags inst_flags = { 0 };