From 3d375d9e0feee79e63a552a3eb3b46f989afce34 Mon Sep 17 00:00:00 2001 From: Yan Burman Date: Mon, 4 Dec 2006 15:03:01 -0800 Subject: [JFFS2] replace kmalloc+memset with kzalloc Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- fs/jffs2/fs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/jffs2/fs.c') diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 7bc1a4201c0..abb90c0c09c 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -502,12 +502,11 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent) if (ret) return ret; - c->inocache_list = kmalloc(INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *), GFP_KERNEL); + c->inocache_list = kcalloc(INOCACHE_HASHSIZE, sizeof(struct jffs2_inode_cache *), GFP_KERNEL); if (!c->inocache_list) { ret = -ENOMEM; goto out_wbuf; } - memset(c->inocache_list, 0, INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *)); jffs2_init_xattr_subsystem(c); -- cgit v1.2.3-18-g5258