[MTD] replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
committed by
David Woodhouse
parent
998a43e72d
commit
95b93a0cd4
@@ -207,11 +207,10 @@ static int parse_afs_partitions(struct mtd_info *mtd,
|
||||
if (!sz)
|
||||
return ret;
|
||||
|
||||
parts = kmalloc(sz, GFP_KERNEL);
|
||||
parts = kzalloc(sz, GFP_KERNEL);
|
||||
if (!parts)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(parts, 0, sz);
|
||||
str = (char *)(parts + idx);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user