Skip to content

Commit bcac2b1

Browse files
michalsimektorvalds
authored andcommitted
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>
1 parent 3fe4a97 commit bcac2b1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎fs/proc/proc_devtree.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,20 +195,20 @@ void proc_device_tree_add_node(struct device_node *np,
195195
p = fixup_name(np, de, p);
196196

197197
ent = proc_mkdir(p, de);
198-
if (ent == 0)
198+
if (ent == NULL)
199199
break;
200200
proc_device_tree_add_node(child, ent);
201201
}
202202
of_node_put(child);
203203

204-
for (pp = np->properties; pp != 0; pp = pp->next) {
204+
for (pp = np->properties; pp != NULL; pp = pp->next) {
205205
p = pp->name;
206206

207207
if (duplicate_name(de, p))
208208
p = fixup_name(np, de, p);
209209

210210
ent = __proc_device_tree_add_prop(de, pp, p);
211-
if (ent == 0)
211+
if (ent == NULL)
212212
break;
213213
}
214214
}
@@ -221,10 +221,10 @@ void __init proc_device_tree_init(void)
221221
struct device_node *root;
222222

223223
proc_device_tree = proc_mkdir("device-tree", NULL);
224-
if (proc_device_tree == 0)
224+
if (proc_device_tree == NULL)
225225
return;
226226
root = of_find_node_by_path("/");
227-
if (root == 0) {
227+
if (root == NULL) {
228228
printk(KERN_ERR "/proc/device-tree: can't find root\n");
229229
return;
230230
}

0 commit comments

Comments
 (0)