aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_devtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/proc_devtree.c')
-rw-r--r--fs/proc/proc_devtree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 70779b2fc209..c82dd5147845 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -74,9 +74,9 @@ __proc_device_tree_add_prop(struct proc_dir_entry *de, struct property *pp,
74 return NULL; 74 return NULL;
75 75
76 if (!strncmp(name, "security-", 9)) 76 if (!strncmp(name, "security-", 9))
77 ent->size = 0; /* don't leak number of password chars */ 77 proc_set_size(ent, 0); /* don't leak number of password chars */
78 else 78 else
79 ent->size = pp->length; 79 proc_set_size(ent, pp->length);
80 80
81 return ent; 81 return ent;
82} 82}
@@ -232,6 +232,7 @@ void __init proc_device_tree_init(void)
232 return; 232 return;
233 root = of_find_node_by_path("/"); 233 root = of_find_node_by_path("/");
234 if (root == NULL) { 234 if (root == NULL) {
235 remove_proc_entry("device-tree", NULL);
235 pr_debug("/proc/device-tree: can't find root\n"); 236 pr_debug("/proc/device-tree: can't find root\n");
236 return; 237 return;
237 } 238 }