|
@@ -3994,11 +3994,8 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
|
|
/* Allocate buffers, if necessary */
|
|
/* Allocate buffers, if necessary */
|
|
if (!this->page_buf) {
|
|
if (!this->page_buf) {
|
|
this->page_buf = kzalloc(mtd->writesize, GFP_KERNEL);
|
|
this->page_buf = kzalloc(mtd->writesize, GFP_KERNEL);
|
|
- if (!this->page_buf) {
|
|
|
|
- printk(KERN_ERR "%s: Can't allocate page_buf\n",
|
|
|
|
- __func__);
|
|
|
|
|
|
+ if (!this->page_buf)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
#ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE
|
|
#ifdef CONFIG_MTD_ONENAND_VERIFY_WRITE
|
|
this->verify_buf = kzalloc(mtd->writesize, GFP_KERNEL);
|
|
this->verify_buf = kzalloc(mtd->writesize, GFP_KERNEL);
|
|
if (!this->verify_buf) {
|
|
if (!this->verify_buf) {
|
|
@@ -4011,8 +4008,6 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
|
|
if (!this->oob_buf) {
|
|
if (!this->oob_buf) {
|
|
this->oob_buf = kzalloc(mtd->oobsize, GFP_KERNEL);
|
|
this->oob_buf = kzalloc(mtd->oobsize, GFP_KERNEL);
|
|
if (!this->oob_buf) {
|
|
if (!this->oob_buf) {
|
|
- printk(KERN_ERR "%s: Can't allocate oob_buf\n",
|
|
|
|
- __func__);
|
|
|
|
if (this->options & ONENAND_PAGEBUF_ALLOC) {
|
|
if (this->options & ONENAND_PAGEBUF_ALLOC) {
|
|
this->options &= ~ONENAND_PAGEBUF_ALLOC;
|
|
this->options &= ~ONENAND_PAGEBUF_ALLOC;
|
|
kfree(this->page_buf);
|
|
kfree(this->page_buf);
|