summaryrefslogtreecommitdiff
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 6a45be0..52d51eb 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);
/*