All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Remove unnecessary NULL check in commit_planes_for_stream()
@ 2022-07-13 11:33 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-07-13 11:33 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Joshua Aberback, kernel-janitors, Alex Hung, Leo Li, Wenjing Liu,
	Pan, Xinhui, Rodrigo Siqueira, amd-gfx, Nicholas Kazlauskas,
	Meenakshikumar Somasundaram, David Airlie, Roy Chan,
	Michael Strauss, Alvin Lee, Daniel Vetter, Martin Leung,
	Alex Deucher, Jun Lei, Christian König, Jimmy Kizito

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>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index dc2c59995a19..76f9af2c5e19 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3366,7 +3366,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 };
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-14 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-13 11:33 [PATCH] drm/amd/display: Remove unnecessary NULL check in commit_planes_for_stream() Dan Carpenter
2022-07-13 11:33 ` Dan Carpenter
2022-07-14 16:37 ` Alex Deucher
2022-07-14 16:37   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.