aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/inftlcore.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-11-15 14:10:29 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2006-11-28 18:47:21 -0500
commit95b93a0cd46682c6d9e8eea803fda510cb6b863a (patch)
tree7e430d3fc04ed20791187d144730dd3052292c67 /drivers/mtd/inftlcore.c
parent998a43e72d20afa7566dad66fd866fe939a89c09 (diff)
[MTD] replace kmalloc+memset with kzalloc
Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/inftlcore.c')
-rw-r--r--drivers/mtd/inftlcore.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index d2f54c037e0f..b0e396504e67 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -67,13 +67,12 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
67 67
68 DEBUG(MTD_DEBUG_LEVEL3, "INFTL: add_mtd for %s\n", mtd->name); 68 DEBUG(MTD_DEBUG_LEVEL3, "INFTL: add_mtd for %s\n", mtd->name);
69 69
70 inftl = kmalloc(sizeof(*inftl), GFP_KERNEL); 70 inftl = kzalloc(sizeof(*inftl), GFP_KERNEL);
71 71
72 if (!inftl) { 72 if (!inftl) {
73 printk(KERN_WARNING "INFTL: Out of memory for data structures\n"); 73 printk(KERN_WARNING "INFTL: Out of memory for data structures\n");
74 return; 74 return;
75 } 75 }
76 memset(inftl, 0, sizeof(*inftl));
77 76
78 inftl->mbd.mtd = mtd; 77 inftl->mbd.mtd = mtd;
79 inftl->mbd.devnum = -1; 78 inftl->mbd.devnum = -1;