Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5001a27 authored by Wyatt Banks's avatar Wyatt Banks Committed by Linus Torvalds
Browse files

HFSPlus: change kmalloc/memset to kzalloc



Removed kmalloc and memset in favor of kzalloc.

To explain the HFSPLUS_SB() macro in the removed memset call:

hfsplus_fs.h:#define HFSPLUS_SB(super)  (*(struct hfsplus_sb_info *)(super)->s_fs_info)

Signed-off-by: default avatarWyatt Banks <wyatt@banksresearch.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent abd4aa5a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -283,11 +283,10 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
	struct nls_table *nls = NULL;
	int err = -EINVAL;

	sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL);
	sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
	if (!sbi)
		return -ENOMEM;

	memset(sbi, 0, sizeof(HFSPLUS_SB(sb)));
	sb->s_fs_info = sbi;
	INIT_HLIST_HEAD(&sbi->rsrc_inodes);
	hfsplus_fill_defaults(sbi);