aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/jffs/intrep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/jffs/intrep.c b/fs/jffs/intrep.c
index 478a74e2e9d5..d0e783f199ea 100644
--- a/fs/jffs/intrep.c
+++ b/fs/jffs/intrep.c
@@ -592,7 +592,7 @@ jffs_add_virtual_root(struct jffs_control *c)
592 D2(printk("jffs_add_virtual_root(): " 592 D2(printk("jffs_add_virtual_root(): "
593 "Creating a virtual root directory.\n")); 593 "Creating a virtual root directory.\n"));
594 594
595 if (!(root = kmalloc(sizeof(struct jffs_file), GFP_KERNEL))) { 595 if (!(root = kzalloc(sizeof(struct jffs_file), GFP_KERNEL))) {
596 return -ENOMEM; 596 return -ENOMEM;
597 } 597 }
598 no_jffs_file++; 598 no_jffs_file++;
@@ -604,7 +604,6 @@ jffs_add_virtual_root(struct jffs_control *c)
604 DJM(no_jffs_node++); 604 DJM(no_jffs_node++);
605 memset(node, 0, sizeof(struct jffs_node)); 605 memset(node, 0, sizeof(struct jffs_node));
606 node->ino = JFFS_MIN_INO; 606 node->ino = JFFS_MIN_INO;
607 memset(root, 0, sizeof(struct jffs_file));
608 root->ino = JFFS_MIN_INO; 607 root->ino = JFFS_MIN_INO;
609 root->mode = S_IFDIR | S_IRWXU | S_IRGRP 608 root->mode = S_IFDIR | S_IRWXU | S_IRGRP
610 | S_IXGRP | S_IROTH | S_IXOTH; 609 | S_IXGRP | S_IROTH | S_IXOTH;