mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: remove an unnecessary NULL check
@ 2023-03-06 11:28 Danila Chernetsov
  0 siblings, 0 replies; only message in thread
From: Danila Chernetsov @ 2023-03-06 11:28 UTC (permalink / raw)
  To: Harry Wentland
  Cc: Danila Chernetsov, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	amd-gfx, dri-devel, linux-kernel, lvc-project

The 'pipe' can't be NULL because it points to an element of array.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixed: 7cf2c840c6b5 (drm/amd/display: Commit validation set from state)
Signed-off-by: Danila Chernetsov <listdansp@mail.ru>
---
 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 0cb8d1f934d1..d3b850372eb3 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1854,7 +1854,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
 		for (k = 0; k < MAX_PIPES; k++) {
 			pipe = &context->res_ctx.pipe_ctx[k];
 
-			for (l = 0 ; pipe && l < context->stream_count; l++)  {
+			for (l = 0 ; l < context->stream_count; l++)  {
 				if (context->streams[l] &&
 					context->streams[l] == pipe->stream &&
 					dc->hwss.setup_stereo)
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-06 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06 11:28 [PATCH] drm/amd/display: remove an unnecessary NULL check Danila Chernetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®