diff options
| author | Jingoo Han <jg1.han@samsung.com> | 2014-02-06 01:19:35 -0500 |
|---|---|---|
| committer | Brian Norris <computersforpeace@gmail.com> | 2014-03-11 01:42:25 -0400 |
| commit | 5c8b1fbb2e1bfaffbaf9b8d8c47bb65470787de6 (patch) | |
| tree | 454f5b82753baf153b9de598c662f3425b85a97a /drivers/mtd/chips | |
| parent | e4eec195f3e8106362da72c9d94dd6fcf598ddb7 (diff) | |
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: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/chips')
| -rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 8 | ||||
| -rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 8 | ||||
| -rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0020.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/chips/cfi_probe.c | 4 | ||||
| -rw-r--r-- | drivers/mtd/chips/cfi_util.c | 4 |
5 files changed, 6 insertions, 20 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index a19719e00a69..5e74c860e532 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
| @@ -434,10 +434,8 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) | |||
| 434 | int i; | 434 | int i; |
| 435 | 435 | ||
| 436 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); | 436 | mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); |
| 437 | if (!mtd) { | 437 | if (!mtd) |
| 438 | printk(KERN_ERR "Failed to allocate memory for MTD device\n"); | ||
| 439 | return NULL; | 438 | return NULL; |
| 440 | } | ||
| 441 | mtd->priv = map; | 439 | mtd->priv = map; |
| 442 | mtd->type = MTD_NORFLASH; | 440 | mtd->type = MTD_NORFLASH; |
| 443 | 441 | ||
| @@ -563,10 +561,8 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) | |||
| 563 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; | 561 | mtd->numeraseregions = cfi->cfiq->NumEraseRegions * cfi->numchips; |
| 564 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) | 562 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) |
| 565 | * mtd->numeraseregions, GFP_KERNEL); | 563 | * mtd->numeraseregions, GFP_KERNEL); |
| 566 | if (!mtd->eraseregions) { | 564 | if (!mtd->eraseregions) |
| 567 | printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n"); | ||
| 568 | goto setup_err; | 565 | goto setup_err; |
| 569 | } | ||
| 570 | 566 | ||
| 571 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { | 567 | for (i=0; i<cfi->cfiq->NumEraseRegions; i++) { |
| 572 | unsigned long ernum, ersize; | 568 | unsigned long ernum, ersize; |
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; |
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 88529422c401..6293855fb5ee 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c | |||
| @@ -175,7 +175,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) | |||
| 175 | //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); | 175 | //printk(KERN_DEBUG "number of CFI chips: %d\n", cfi->numchips); |
| 176 | 176 | ||
| 177 | if (!mtd) { | 177 | if (!mtd) { |
| 178 | printk(KERN_ERR "Failed to allocate memory for MTD device\n"); | ||
| 179 | kfree(cfi->cmdset_priv); | 178 | kfree(cfi->cmdset_priv); |
| 180 | return NULL; | 179 | return NULL; |
| 181 | } | 180 | } |
| @@ -188,7 +187,6 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) | |||
| 188 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) | 187 | mtd->eraseregions = kmalloc(sizeof(struct mtd_erase_region_info) |
| 189 | * mtd->numeraseregions, GFP_KERNEL); | 188 | * mtd->numeraseregions, GFP_KERNEL); |
| 190 | if (!mtd->eraseregions) { | 189 | if (!mtd->eraseregions) { |
| 191 | printk(KERN_ERR "Failed to allocate memory for MTD erase region info\n"); | ||
| 192 | kfree(cfi->cmdset_priv); | 190 | kfree(cfi->cmdset_priv); |
| 193 | kfree(mtd); | 191 | kfree(mtd); |
| 194 | return NULL; | 192 | return NULL; |
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c index d25535279404..e8d0164498b0 100644 --- a/drivers/mtd/chips/cfi_probe.c +++ b/drivers/mtd/chips/cfi_probe.c | |||
| @@ -168,10 +168,8 @@ static int __xipram cfi_chip_setup(struct map_info *map, | |||
| 168 | return 0; | 168 | return 0; |
| 169 | 169 | ||
| 170 | cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); | 170 | cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); |
| 171 | if (!cfi->cfiq) { | 171 | if (!cfi->cfiq) |
| 172 | printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name); | ||
| 173 | return 0; | 172 | return 0; |
| 174 | } | ||
| 175 | 173 | ||
| 176 | memset(cfi->cfiq,0,sizeof(struct cfi_ident)); | 174 | memset(cfi->cfiq,0,sizeof(struct cfi_ident)); |
| 177 | 175 | ||
diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c index f992418f40a8..08049f6eea60 100644 --- a/drivers/mtd/chips/cfi_util.c +++ b/drivers/mtd/chips/cfi_util.c | |||
| @@ -116,10 +116,8 @@ __xipram cfi_read_pri(struct map_info *map, __u16 adr, __u16 size, const char* n | |||
| 116 | printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); | 116 | printk(KERN_INFO "%s Extended Query Table at 0x%4.4X\n", name, adr); |
| 117 | 117 | ||
| 118 | extp = kmalloc(size, GFP_KERNEL); | 118 | extp = kmalloc(size, GFP_KERNEL); |
| 119 | if (!extp) { | 119 | if (!extp) |
| 120 | printk(KERN_ERR "Failed to allocate memory\n"); | ||
| 121 | goto out; | 120 | goto out; |
| 122 | } | ||
| 123 | 121 | ||
| 124 | #ifdef CONFIG_MTD_XIP | 122 | #ifdef CONFIG_MTD_XIP |
| 125 | local_irq_disable(); | 123 | local_irq_disable(); |
