Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: onenand: 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>

authored by

Jingoo Han and committed by
Brian Norris
e4eec195 54f5a57e

+2 -9
+1 -6
drivers/mtd/onenand/onenand_base.c
··· 3994 3994 /* Allocate buffers, if necessary */ 3995 3995 if (!this->page_buf) { 3996 3996 this->page_buf = kzalloc(mtd->writesize, GFP_KERNEL); 3997 - if (!this->page_buf) { 3998 - printk(KERN_ERR "%s: Can't allocate page_buf\n", 3999 - __func__); 3997 + if (!this->page_buf) 4000 3998 return -ENOMEM; 4001 - } 4002 3999 #ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE 4003 4000 this->verify_buf = kzalloc(mtd->writesize, GFP_KERNEL); 4004 4001 if (!this->verify_buf) { ··· 4008 4011 if (!this->oob_buf) { 4009 4012 this->oob_buf = kzalloc(mtd->oobsize, GFP_KERNEL); 4010 4013 if (!this->oob_buf) { 4011 - printk(KERN_ERR "%s: Can't allocate oob_buf\n", 4012 - __func__); 4013 4014 if (this->options & ONENAND_PAGEBUF_ALLOC) { 4014 4015 this->options &= ~ONENAND_PAGEBUF_ALLOC; 4015 4016 kfree(this->page_buf);
+1 -3
drivers/mtd/onenand/samsung.c
··· 872 872 873 873 size = sizeof(struct mtd_info) + sizeof(struct onenand_chip); 874 874 mtd = kzalloc(size, GFP_KERNEL); 875 - if (!mtd) { 876 - dev_err(&pdev->dev, "failed to allocate memory\n"); 875 + if (!mtd) 877 876 return -ENOMEM; 878 - } 879 877 880 878 onenand = kzalloc(sizeof(struct s3c_onenand), GFP_KERNEL); 881 879 if (!onenand) {