diff mbox series

drm/amd/display: remove an unnecessary NULL check

Message ID 20230306112824.8049-1-listdansp@mail.ru (mailing list archive)
State New, archived
Headers show
Series drm/amd/display: remove an unnecessary NULL check | expand

Commit Message

Danila Chernetsov March 6, 2023, 11:28 a.m. UTC
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 mbox series

Patch

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)