Commit 5c8b1fbb authored by Jingoo Han's avatar Jingoo Han Committed by Brian Norris

mtd: cfi: Remove unnecessary OOM messages

The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent e4eec195
...@@ -434,10 +434,8 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) ...@@ -434,10 +434,8 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary)
int i; int i;
mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
if (!mtd) { if (!mtd)
printk(KERN_ERR "Failed to allocate memory for MTD device\n");
return NULL; return NULL;
}
mtd->priv = map; mtd->priv = map;
mtd->type = MTD_NORFLASH; mtd->type = MTD_NORFLASH;
...@@ -563,10 +561,8 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) ...@@ -563,10 +561,8 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd)
mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips;
mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info)
* mtd->numeraseregions, GFP_KERNEL); * mtd->numeraseregions, GFP_KERNEL);
if (!mtd->eraseregions) { if (!mtd->eraseregions)
printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n");
goto setup_err; goto setup_err;
}
for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { for (i=0; i<cfi->cfiq->NumEraseRegions; i++) {
unsigned long ernum, ersize; unsigned long ernum, ersize;
......
...@@ -506,10 +506,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) ...@@ -506,10 +506,8 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
int i; int i;
mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
if (!mtd) { if (!mtd)
printk(KERN_WARNING "Failed to allocate memory for MTD device\n");
return NULL; return NULL;
}
mtd->priv = map; mtd->priv = map;
mtd->type = MTD_NORFLASH; mtd->type = MTD_NORFLASH;
...@@ -660,10 +658,8 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd) ...@@ -660,10 +658,8 @@ static struct mtd_info *cfi_amdstd_setup(struct mtd_info *mtd)
mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips;
mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info)
* mtd->numeraseregions, GFP_KERNEL); * mtd->numeraseregions, GFP_KERNEL);
if (!mtd->eraseregions) { if (!mtd->eraseregions)
printk(KERN_WARNING "Failed to allocate memory for MTD erase region info\n");
goto setup_err; goto setup_err;
}
for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { for (i=0; i<cfi->cfiq->NumEraseRegions; i++) {
unsigned long ernum, ersize; unsigned long ernum, ersize;
......
...@@ -175,7 +175,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) ...@@ -175,7 +175,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
//printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips);
if (!mtd) { if (!mtd) {
printk(KERN_ERR "Failed to allocate memory for MTD device\n");
kfree(cfi->cmdset_priv); kfree(cfi->cmdset_priv);
return NULL; return NULL;
} }
...@@ -188,7 +187,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) ...@@ -188,7 +187,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map)
mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info)
* mtd->numeraseregions, GFP_KERNEL); * mtd->numeraseregions, GFP_KERNEL);
if (!mtd->eraseregions) { if (!mtd->eraseregions) {
printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n");
kfree(cfi->cmdset_priv); kfree(cfi->cmdset_priv);
kfree(mtd); kfree(mtd);
return NULL; return NULL;
......
...@@ -168,10 +168,8 @@ static int __xipram cfi_chip_setup(struct map_info *map, ...@@ -168,10 +168,8 @@ static int __xipram cfi_chip_setup(struct map_info *map,
return 0; return 0;
cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL);
if (!cfi->cfiq) { if (!cfi->cfiq)
printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name);
return 0; return 0;
}
memset(cfi->cfiq,0,sizeof(struct cfi_ident)); memset(cfi->cfiq,0,sizeof(struct cfi_ident));
......
...@@ -116,10 +116,8 @@ __xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* n ...@@ -116,10 +116,8 @@ __xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* n
printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr);
extp = kmalloc(size, GFP_KERNEL); extp = kmalloc(size, GFP_KERNEL);
if (!extp) { if (!extp)
printk(KERN_ERR "Failed to allocate memory\n");
goto out; goto out;
}
#ifdef CONFIG_MTD_XIP #ifdef CONFIG_MTD_XIP
local_irq_disable(); local_irq_disable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment