summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@toblux.com>2024-04-04 22:29:33 +0300
committerAndreas Larsson <andreas@gaisler.com>2024-04-22 17:45:52 +0300
commitc7933eaeaf12dd06a7b721ad50b7a78b0f3cbf46 (patch)
tree52c21ddd2fa75e762e535f761d68f4eb9c3079a9 /arch/sparc
parent6c94284465ffefa9c5afc5288bb8cec2a020317f (diff)
downloadlinux-c7933eaeaf12dd06a7b721ad50b7a78b0f3cbf46.tar.xz
sparc: Compare pointers to NULL instead of 0
Fixes the following two Coccinelle/coccicheck warnings reported by badzero.cocci: WARNING comparing pointer to 0 WARNING comparing pointer to 0 Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Reviewed-by: Andreas Larsson <andreas@gaisler.com> Link: https://lore.kernel.org/r/20240404192932.13075-2-thorsten.blum@toblux.com Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/prom/tree_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/prom/tree_64.c b/arch/sparc/prom/tree_64.c
index 989e7992d629..88793e5b0ab5 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