From 95b93a0cd46682c6d9e8eea803fda510cb6b863a Mon Sep 17 00:00:00 2001 From: Burman Yan Date: Wed, 15 Nov 2006 21:10:29 +0200 Subject: [MTD] replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman Signed-off-by: David Woodhouse --- drivers/mtd/mtdpart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/mtd/mtdpart.c') diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index a20f75fd8d61..89692f898ef4 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -323,14 +323,13 @@ int add_mtd_partitions(struct mtd_info *master, for (i = 0; i < nbparts; i++) { /* allocate the partition structure */ - slave = kmalloc (sizeof(*slave), GFP_KERNEL); + slave = kzalloc (sizeof(*slave), GFP_KERNEL); if (!slave) { printk ("memory allocation error while creating partitions for \"%s\"\n", master->name); del_mtd_partitions(master); return -ENOMEM; } - memset(slave, 0, sizeof(*slave)); list_add(&slave->list, &mtd_partitions); /* set up the MTD object for this partition */ -- cgit v1.2.2