aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/diskonchip.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/nand/diskonchip.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/nand/diskonchip.c')
-rw-r--r--drivers/mtd/nand/diskonchip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index 6107f532855b..12608c13cce5 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -1635,13 +1635,12 @@ static int __init doc_probe(unsigned long physadr)
1635 1635
1636 len = sizeof(struct mtd_info) + 1636 len = sizeof(struct mtd_info) +
1637 sizeof(struct nand_chip) + sizeof(struct doc_priv) + (2 * sizeof(struct nand_bbt_descr)); 1637 sizeof(struct nand_chip) + sizeof(struct doc_priv) + (2 * sizeof(struct nand_bbt_descr));
1638 mtd = kmalloc(len, GFP_KERNEL); 1638 mtd = kzalloc(len, GFP_KERNEL);
1639 if (!mtd) { 1639 if (!mtd) {
1640 printk(KERN_ERR "DiskOnChip kmalloc (%d bytes) failed!\n", len); 1640 printk(KERN_ERR "DiskOnChip kmalloc (%d bytes) failed!\n", len);
1641 ret = -ENOMEM; 1641 ret = -ENOMEM;
1642 goto fail; 1642 goto fail;
1643 } 1643 }
1644 memset(mtd, 0, len);
1645 1644
1646 nand = (struct nand_chip *) (mtd + 1); 1645 nand = (struct nand_chip *) (mtd + 1);
1647 doc = (struct doc_priv *) (nand + 1); 1646 doc = (struct doc_priv *) (nand + 1);