aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/afs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/afs.c')
-rw-r--r--drivers/mtd/afs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
index 6a45be04564..52d51eb91c1 100644
--- a/drivers/mtd/afs.c
+++ b/drivers/mtd/afs.c
@@ -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);
/*