diff options
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0002.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index 718244d1211a..e21fde9d4d7e 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -506,10 +506,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) | |||
506 | int i; | 506 | int i; |
507 | 507 | ||
508 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); | 508 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); |
509 | if (!mtd) { | 509 | if (!mtd) |
510 | printk(KERN_WARNING "Failed to allocate memory for MTD device\n"); | ||
511 | return NULL; | 510 | return NULL; |
512 | } | ||
513 | mtd->priv = map; | 511 | mtd->priv = map; |
514 | mtd->type = MTD_NORFLASH; | 512 | mtd->type = MTD_NORFLASH; |
515 | 513 | ||
@@ -660,10 +658,8 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd) | |||
660 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; | 658 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; |
661 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) | 659 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) |
662 | * mtd->numeraseregions, GFP_KERNEL); | 660 | * mtd->numeraseregions, GFP_KERNEL); |
663 | if (!mtd->eraseregions) { | 661 | if (!mtd->eraseregions) |
664 | printk(KERN_WARNING "Failed to allocate memory for MTD erase region info\n"); | ||
665 | goto setup_err; | 662 | goto setup_err; |
666 | } | ||
667 | 663 | ||
668 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { | 664 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { |
669 | unsigned long ernum, ersize; | 665 | unsigned long ernum, ersize; |