procfs: remove sparse errors in proc_devtree.c

CHECK   fs/proc/proc_devtree.c
fs/proc/proc_devtree.c:197:14: warning: Using plain integer as NULL pointer
fs/proc/proc_devtree.c:203:34: warning: Using plain integer as NULL pointer
fs/proc/proc_devtree.c:210:14: warning: Using plain integer as NULL pointer
fs/proc/proc_devtree.c:223:26: warning: Using plain integer as NULL pointer
fs/proc/proc_devtree.c:226:14: warning: Using plain integer as NULL pointer

Signed-off-by: Michal Simek <monstr@monstr.eu>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Michal Simek 2009-06-17 16:25:59 -07:00 committed by Linus Torvalds
parent 3fe4a975d6
commit bcac2b1b7d
1 changed files with 5 additions and 5 deletions

View File

@ -195,20 +195,20 @@ void proc_device_tree_add_node(struct device_node *np,
p = fixup_name(np, de, p); p = fixup_name(np, de, p);
ent = proc_mkdir(p, de); ent = proc_mkdir(p, de);
if (ent == 0) if (ent == NULL)
break; break;
proc_device_tree_add_node(child, ent); proc_device_tree_add_node(child, ent);
} }
of_node_put(child); of_node_put(child);
for (pp = np->properties; pp != 0; pp = pp->next) { for (pp = np->properties; pp != NULL; pp = pp->next) {
p = pp->name; p = pp->name;
if (duplicate_name(de, p)) if (duplicate_name(de, p))
p = fixup_name(np, de, p); p = fixup_name(np, de, p);
ent = __proc_device_tree_add_prop(de, pp, p); ent = __proc_device_tree_add_prop(de, pp, p);
if (ent == 0) if (ent == NULL)
break; break;
} }
} }
@ -221,10 +221,10 @@ void __init proc_device_tree_init(void)
struct device_node *root; struct device_node *root;
proc_device_tree = proc_mkdir("device-tree", NULL); proc_device_tree = proc_mkdir("device-tree", NULL);
if (proc_device_tree == 0) if (proc_device_tree == NULL)
return; return;
root = of_find_node_by_path("/"); root = of_find_node_by_path("/");
if (root == 0) { if (root == NULL) {
printk(KERN_ERR "/proc/device-tree: can't find root\n"); printk(KERN_ERR "/proc/device-tree: can't find root\n");
return; return;
} }