[PATCH 12/12] of: Fix usage of 0 as NULL pointer

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 25 13:38:30 EDT 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/oftree.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/oftree.c b/common/oftree.c
index 49758a9..677e934 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -207,7 +207,7 @@ int fdt_find_and_setprop(struct fdt_header *fdt, const char *node,
 	if (nodeoff < 0)
 		return nodeoff;
 
-	if ((!create) && (fdt_get_property(fdt, nodeoff, prop, 0) == NULL))
+	if ((!create) && (fdt_get_property(fdt, nodeoff, prop, NULL) == NULL))
 		return 0; /* create flag not set; so exit quietly */
 
 	return fdt_setprop(fdt, nodeoff, prop, val, len);
-- 
1.7.10




More information about the barebox mailing list