From: Fabian Frederick Date: Thu, 3 Apr 2014 21:50:21 +0000 (-0700) Subject: befs: replace kmalloc/memset 0 by kzalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d4319ef570d44a8957b2af0a35d3e92b844b1b5;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git befs: replace kmalloc/memset 0 by kzalloc Use kzalloc for clean fs_info allocation like other filesystems. Signed-off-by: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 845d2d690ce2..a1a09462fe47 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -791,7 +791,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent) save_mount_options(sb, data); - sb->s_fs_info = kmalloc(sizeof (*befs_sb), GFP_KERNEL); + sb->s_fs_info = kzalloc(sizeof(*befs_sb), GFP_KERNEL); if (sb->s_fs_info == NULL) { printk(KERN_ERR "BeFS(%s): Unable to allocate memory for private " @@ -799,7 +799,6 @@ befs_fill_super(struct super_block *sb, void *data, int silent) goto unacquire_none; } befs_sb = BEFS_SB(sb); - memset(befs_sb, 0, sizeof(befs_sb_info)); if (!parse_options((char *) data, &befs_sb->mount_opts)) { befs_error(sb, "cannot parse mount options");