[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1648085963-25580-1-git-send-email-baihaowen@meizu.com>
Date: Thu, 24 Mar 2022 09:39:23 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: <davem@...emloft.net>
CC: <sparclinux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Haowen Bai <baihaowen@...zu.com>
Subject: [PATCH] sparc: Fix warning comparing pointer to 0
Avoid pointer type value compared with 0 to make code clear.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
arch/sparc/prom/tree_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c
index 989e799..88793e5b 100644
--- a/arch/sparc/prom/tree_64.c
+++ b/arch/sparc/prom/tree_64.c
@@ -332,7 +332,7 @@ prom_setprop(phandle node, const char *pname, char *value, int size)
if (size == 0)
return 0;
- if ((pname == 0) || (value == 0))
+ if ((pname == NULL) || (value == NULL))
return 0;
#ifdef CONFIG_SUN_LDOMS
--
2.7.4
Powered by blists - more mailing lists