mtd: onenand: remove redundant offset check
authorBrian Norris <computersforpeace@gmail.com>
Fri, 16 Aug 2013 05:44:57 +0000 (22:44 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Sun, 27 Oct 2013 23:27:02 +0000 (16:27 -0700)
The mtd_block_isbad() interface already checks for this.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/onenand/onenand_base.c

index b3f41f200622b39f5ef7d46ab6b772ed2eb9e97e..7b7c1d21f612c0ab89545474cc13ed5ad6900aea 100644 (file)
@@ -2556,10 +2556,6 @@ static int onenand_block_isbad(struct mtd_info *mtd, loff_t ofs)
 {
        int ret;
 
-       /* Check for invalid offset */
-       if (ofs > mtd->size)
-               return -EINVAL;
-
        onenand_get_device(mtd, FL_READING);
        ret = onenand_block_isbad_nolock(mtd, ofs, 0);
        onenand_release_device(mtd);