mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0
@ 2024-07-01  7:04 Jiapeng Chong
  2024-07-01  7:04 ` [PATCH 3/4] " Jiapeng Chong
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jiapeng Chong @ 2024-07-01  7:04 UTC (permalink / raw)
  To: harry.wentland
  Cc: sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
	christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx,
	dri-devel, linux-kernel, Jiapeng Chong, Abaci Robot

Avoid pointer type value compared with 0 to make code clear.

./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c:14:12-13: WARNING comparing pointer to 0.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 .../amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
index 1a0da8c6df5a..f56abe9ab919 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
@@ -11,7 +11,7 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instance
 {
 	bool result = false;
 
-	if (out == 0)
+	if (!out)
 		return false;
 
 	memset(out, 0, sizeof(struct dml2_core_instance));
-- 
2.20.1.7.g153144c


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

end of thread, other threads:[~2024-07-01 19:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-01  7:04 [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0 Jiapeng Chong
2024-07-01  7:04 ` [PATCH 3/4] " Jiapeng Chong
2024-07-01  7:04 ` [PATCH 2/4] " Jiapeng Chong
2024-07-01  7:04 ` [PATCH 1/4] " Jiapeng Chong
2024-07-01 19:22 ` [PATCH 4/4] " Alex Deucher

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®