[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1186998992.29518.15.camel@bluegenie>
Date: Mon, 13 Aug 2007 15:26:32 +0530
From: Surya Prabhakar N <surya.prabhakar@...ro.com>
To: dwmw2@...radead.org, linux-mtd@...ts.infradead.org
Cc: Linux Kernel <linux-kernel@...r.kernel.org>,
kernel-janitors <kernel-janitors@...ts.osdl.org>
Subject: [KJ] replacing kmalloc with kzalloc in
drivers/mtd/devices/docprobe.c
Hi,
Replacing kmalloc with kzalloc and cleaning up memset in
drivers/mtd/devices/docprobe.c.
Signed-off-by: Surya Prabhakar <surya.prabhakar@...ro.com>
---
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index 54aa759..53be397 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -254,7 +254,7 @@ static void __init DoC_Probe(unsigned long physadr)
return;
}
docfound = 1;
- mtd = kmalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);
+ mtd = kzalloc(sizeof(struct DiskOnChip) + sizeof(struct mtd_info), GFP_KERNEL);
if (!mtd) {
printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");
@@ -264,9 +264,6 @@ static void __init DoC_Probe(unsigned long physadr)
this = (struct DiskOnChip *)(&mtd[1]);
- memset((char *)mtd,0, sizeof(struct mtd_info));
- memset((char *)this, 0, sizeof(struct DiskOnChip));
-
mtd->priv = this;
this->virtadr = docptr;
this->physadr = physadr;
--
thanks
surya.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists