aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-06-17 19:25:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:03:41 -0400
commitbcac2b1b7d67f4e7c001b755409fafb37cb0d888 (patch)
tree5b69b8e5f1321a602a522b49f676bca54c0cb565
parent3fe4a975d662f11037cb710f8b4b158a3e38f9c0 (diff)
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>
-rw-r--r--fs/proc/proc_devtree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index fc6c3025befd..7ba79a54948c 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -195,20 +195,20 @@ void proc_device_tree_add_node(struct device_node *np,
195 p = fixup_name(np, de, p); 195 p = fixup_name(np, de, p);
196 196
197 ent = proc_mkdir(p, de); 197 ent = proc_mkdir(p, de);
198 if (ent == 0) 198 if (ent == NULL)
199 break; 199 break;
200 proc_device_tree_add_node(child, ent); 200 proc_device_tree_add_node(child, ent);
201 } 201 }
202 of_node_put(child); 202 of_node_put(child);
203 203
204 for (pp = np->properties; pp != 0; pp = pp->next) { 204 for (pp = np->properties; pp != NULL; pp = pp->next) {
205 p = pp->name; 205 p = pp->name;
206 206
207 if (duplicate_name(de, p)) 207 if (duplicate_name(de, p))
208 p = fixup_name(np, de, p); 208 p = fixup_name(np, de, p);
209 209
210 ent = __proc_device_tree_add_prop(de, pp, p); 210 ent = __proc_device_tree_add_prop(de, pp, p);
211 if (ent == 0) 211 if (ent == NULL)
212 break; 212 break;
213 } 213 }
214} 214}
@@ -221,10 +221,10 @@ void __init proc_device_tree_init(void)
221 struct device_node *root; 221 struct device_node *root;
222 222
223 proc_device_tree = proc_mkdir("device-tree", NULL); 223 proc_device_tree = proc_mkdir("device-tree", NULL);
224 if (proc_device_tree == 0) 224 if (proc_device_tree == NULL)
225 return; 225 return;
226 root = of_find_node_by_path("/"); 226 root = of_find_node_by_path("/");
227 if (root == 0) { 227 if (root == NULL) {
228 printk(KERN_ERR "/proc/device-tree: can't find root\n"); 228 printk(KERN_ERR "/proc/device-tree: can't find root\n");
229 return; 229 return;
230 } 230 }