Skip to content

Commit

Permalink
sparc: Compare pointers to NULL instead of 0
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Andreas Larsson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Andreas Larsson <[email protected]>
  • Loading branch information
toblux authored and andreas-gaisler committed Apr 22, 2024
1 parent 6c94284 commit c7933ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sparc/prom/tree_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c7933ea

Please sign in to comment.