Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thorsten Blum and committed by
Andreas Larsson
c7933eae 6c942844

+1 -1
+1 -1
arch/sparc/prom/tree_64.c
··· 332 332 333 333 if (size == 0) 334 334 return 0; 335 - if ((pname == 0) || (value == 0)) 335 + if ((pname == NULL) || (value == NULL)) 336 336 return 0; 337 337 338 338 #ifdef CONFIG_SUN_LDOMS