From 1ef313b3b5a3a60f0939efd7832430e115611419 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 14 Dec 2010 17:07:57 +0200 Subject: [PATCH] --- yaml --- r: 231697 b: refs/heads/master c: beda1d49941765c0765e0f3cb95b4a86de67745d h: refs/heads/master i: 231695: 7e76724dedaba9f365c627fb4ecdee4f03191b08 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/nand_base.c | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 69b04fe20748..9f795b190248 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4ccb3b4497ce01fab4933704fe21581e30fda1a5 +refs/heads/master: beda1d49941765c0765e0f3cb95b4a86de67745d diff --git a/trunk/drivers/mtd/nand/nand_base.c b/trunk/drivers/mtd/nand/nand_base.c index 33550c43acc2..9c8da741dce0 100644 --- a/trunk/drivers/mtd/nand/nand_base.c +++ b/trunk/drivers/mtd/nand/nand_base.c @@ -1782,13 +1782,6 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from, else len = mtd->oobsize; - /* Do not allow read past end of page */ - if ((ops->ooboffs + readlen) > len) { - DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt to read " - "past end of page\n", __func__); - return -EINVAL; - } - if (unlikely(ops->ooboffs >= len)) { DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt to start read " "outside oob\n", __func__); @@ -2384,7 +2377,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, return -EINVAL; } - /* Do not allow write past end of device */ + /* Do not allow reads past end of device */ if (unlikely(to >= mtd->size || ops->ooboffs + ops->ooblen > ((mtd->size >> chip->page_shift) -