Skip to content

Commit c7933ea

Browse files
tobluxandreas-gaisler
authored andcommitted
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>
1 parent 6c94284 commit c7933ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/sparc/prom/tree_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ prom_setprop(phandle node, const char *pname, char *value, int size)
332332

333333
if (size == 0)
334334
return 0;
335-
if ((pname == 0) || (value == 0))
335+
if ((pname == NULL) || (value == NULL))
336336
return 0;
337337

338338
#ifdef CONFIG_SUN_LDOMS

0 commit comments

Comments
 (0)