]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/nand/diskonchip.c
[MTD NAND] CAFÉ controller depends, perhaps unsurprisingly, on NAND
[linux-2.6-omap-h63xx.git] / drivers / mtd / nand / diskonchip.c
index 6107f532855b8d4dbb901ff83c721e76a0b59af2..12608c13cce5b2365c3aaf5e77f2481ec9bef241 100644 (file)
@@ -1635,13 +1635,12 @@ static int __init doc_probe(unsigned long physadr)
 
        len = sizeof(struct mtd_info) +
            sizeof(struct nand_chip) + sizeof(struct doc_priv) + (2 * sizeof(struct nand_bbt_descr));
-       mtd = kmalloc(len, GFP_KERNEL);
+       mtd = kzalloc(len, GFP_KERNEL);
        if (!mtd) {
                printk(KERN_ERR "DiskOnChip kmalloc (%d bytes) failed!\n", len);
                ret = -ENOMEM;
                goto fail;
        }
-       memset(mtd, 0, len);
 
        nand                    = (struct nand_chip *) (mtd + 1);
        doc                     = (struct doc_priv *) (nand + 1);