aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/nand_base.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index d902370df3e0..0793ca39cc88 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1946,7 +1946,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
1946 } 1946 }
1947 1947
1948 if (unlikely(ops->ooboffs >= len)) { 1948 if (unlikely(ops->ooboffs >= len)) {
1949 DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " 1949 DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
1950 "Attempt to start write outside oob\n"); 1950 "Attempt to start write outside oob\n");
1951 return -EINVAL; 1951 return -EINVAL;
1952 } 1952 }
@@ -1956,7 +1956,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
1956 ops->ooboffs + ops->ooblen > 1956 ops->ooboffs + ops->ooblen >
1957 ((mtd->size >> chip->page_shift) - 1957 ((mtd->size >> chip->page_shift) -
1958 (to >> chip->page_shift)) * len)) { 1958 (to >> chip->page_shift)) * len)) {
1959 DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " 1959 DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
1960 "Attempt write beyond end of device\n"); 1960 "Attempt write beyond end of device\n");
1961 return -EINVAL; 1961 return -EINVAL;
1962 } 1962 }
@@ -2012,8 +2012,8 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to,
2012 2012
2013 /* Do not allow writes past end of device */ 2013 /* Do not allow writes past end of device */
2014 if (ops->datbuf && (to + ops->len) > mtd->size) { 2014 if (ops->datbuf && (to + ops->len) > mtd->size) {
2015 DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: " 2015 DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
2016 "Attempt read beyond end of device\n"); 2016 "Attempt write beyond end of device\n");
2017 return -EINVAL; 2017 return -EINVAL;
2018 } 2018 }
2019 2019