mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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: Wyatt Banks <[email protected]> Cc: Roman Zippel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
abd4aa5a97
commit
a5001a2780
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue