Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231697
b: refs/heads/master
c: beda1d4
h: refs/heads/master
i:
  231695: 7e76724
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Jan 6, 2011
1 parent 92473f9 commit 1ef313b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ccb3b4497ce01fab4933704fe21581e30fda1a5
refs/heads/master: beda1d49941765c0765e0f3cb95b4a86de67745d
9 changes: 1 addition & 8 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down Expand Up @@ -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) -
Expand Down

0 comments on commit 1ef313b

Please sign in to comment.