diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-12-07 05:40:34 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 17:39:45 +0100 |
commit | 4a08a9f68168e547c2baf100020e9b96cae5fbd1 (patch) | |
tree | b503ce15601ab821442be14f3bfd888b3fb449cf /fs/jffs | |
parent | [PATCH] arm26: replace kmalloc+memset with kzalloc (diff) | |
download | linux-4a08a9f68168e547c2baf100020e9b96cae5fbd1.tar.xz linux-4a08a9f68168e547c2baf100020e9b96cae5fbd1.zip |
[PATCH] jffs: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jffs')
-rw-r--r-- | fs/jffs/intrep.c | 3 |
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) D2(printk("jffs_add_virtual_root(): " "Creating a virtual root directory.\n")); - if (!(root = kmalloc(sizeof(struct jffs_file), GFP_KERNEL))) { + if (!(root = kzalloc(sizeof(struct jffs_file), GFP_KERNEL))) { return -ENOMEM; } no_jffs_file++; @@ -604,7 +604,6 @@ jffs_add_virtual_root(struct jffs_control *c) DJM(no_jffs_node++); memset(node, 0, sizeof(struct jffs_node)); node->ino = JFFS_MIN_INO; - memset(root, 0, sizeof(struct jffs_file)); root->ino = JFFS_MIN_INO; root->mode = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; |