[PATCH] affs: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
4d2d3cec1d
commit
b593e48d2b
@ -289,12 +289,11 @@ int affs_init_bitmap(struct super_block *sb, int *flags)
|
||||
sbi->s_bmap_count = (sbi->s_partition_size - sbi->s_reserved +
|
||||
sbi->s_bmap_bits - 1) / sbi->s_bmap_bits;
|
||||
size = sbi->s_bmap_count * sizeof(*bm);
|
||||
bm = sbi->s_bitmap = kmalloc(size, GFP_KERNEL);
|
||||
bm = sbi->s_bitmap = kzalloc(size, GFP_KERNEL);
|
||||
if (!sbi->s_bitmap) {
|
||||
printk(KERN_ERR "AFFS: Bitmap allocation failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(sbi->s_bitmap, 0, size);
|
||||
|
||||
bmap_blk = (__be32 *)sbi->s_root_bh->b_data;
|
||||
blk = sb->s_blocksize / 4 - 49;
|
||||
|
Reference in New Issue
Block a user