From: Olaf Hering Date: Sat, 4 Feb 2006 11:44:56 +0000 (+0100) Subject: [PATCH] powerpc: remove pointer/integer confusion in of_find_node_by_name X-Git-Tag: v2.6.16-rc3~67^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=090db7c86d5df0161135793063e75bc1abddaa6f;p=linux-2.6 [PATCH] powerpc: remove pointer/integer confusion in of_find_node_by_name remove pointer/integer confusion Signed-off-by: Olaf Hering Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 2b062853bc..294832a7e0 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -1403,8 +1403,8 @@ struct device_node *of_find_node_by_name(struct device_node *from, read_lock(&devtree_lock); np = from ? from->allnext : allnodes; - for (; np != 0; np = np->allnext) - if (np->name != 0 && strcasecmp(np->name, name) == 0 + for (; np != NULL; np = np->allnext) + if (np->name != NULL && strcasecmp(np->name, name) == 0 && of_node_get(np)) break; if (from)