[PATCH v2 04/17] of/base: fix sparse warning, don't use interger 0 as NULL pointer

Marc Kleine-Budde mkl at pengutronix.de
Sun Mar 1 04:32:10 PST 2015


Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 drivers/of/base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index af10fd1da32c..d45d3941b88d 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -184,7 +184,7 @@ void of_alias_scan(void)
 			end--;
 		len = end - start;
 
-		id = simple_strtol(end, 0, 10);
+		id = simple_strtol(end, NULL, 10);
 		if (id < 0)
 			continue;
 
@@ -280,7 +280,7 @@ struct device_node *of_find_node_by_phandle_from(phandle phandle,
 		root = root_node;
 
 	if (!root)
-		return 0;
+		return NULL;
 
 	of_tree_for_each_node_from(node, root)
 		if (node->phandle == phandle)
-- 
2.1.4




More information about the barebox mailing list