Browse Source

mtd: onenand: remove redundant offset check

The mtd_block_isbad() interface already checks for this.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Brian Norris 12 years ago
parent
commit
53d66baef6
1 changed files with 0 additions and 4 deletions
  1. 0 4
      drivers/mtd/onenand/onenand_base.c

+ 0 - 4
drivers/mtd/onenand/onenand_base.c

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