diff options
Diffstat (limited to 'drivers/mtd/nand/au1550nd.c')
-rw-r--r-- | drivers/mtd/nand/au1550nd.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index 92c334ff4508..de190b8f8a10 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c | |||
@@ -450,7 +450,7 @@ static int __init au1xxx_nand_init(void) | |||
450 | u32 nand_phys; | 450 | u32 nand_phys; |
451 | 451 | ||
452 | /* Allocate memory for MTD device structure and private data */ | 452 | /* Allocate memory for MTD device structure and private data */ |
453 | au1550_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); | 453 | au1550_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); |
454 | if (!au1550_mtd) { | 454 | if (!au1550_mtd) { |
455 | printk("Unable to allocate NAND MTD dev structure.\n"); | 455 | printk("Unable to allocate NAND MTD dev structure.\n"); |
456 | return -ENOMEM; | 456 | return -ENOMEM; |
@@ -459,10 +459,6 @@ static int __init au1xxx_nand_init(void) | |||
459 | /* Get pointer to private data */ | 459 | /* Get pointer to private data */ |
460 | this = (struct nand_chip *)(&au1550_mtd[1]); | 460 | this = (struct nand_chip *)(&au1550_mtd[1]); |
461 | 461 | ||
462 | /* Initialize structures */ | ||
463 | memset(au1550_mtd, 0, sizeof(struct mtd_info)); | ||
464 | memset(this, 0, sizeof(struct nand_chip)); | ||
465 | |||
466 | /* Link the private data with the MTD structure */ | 462 | /* Link the private data with the MTD structure */ |
467 | au1550_mtd->priv = this; | 463 | au1550_mtd->priv = this; |
468 | au1550_mtd->owner = THIS_MODULE; | 464 | au1550_mtd->owner = THIS_MODULE; |