mtd: onenand: remove redundant offset check
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed Nov 13 13:59:02 EST 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=53d66baef631ec7fa83dd1b161bf4c3ebabeb73e
Commit: 53d66baef631ec7fa83dd1b161bf4c3ebabeb73e
Parent: 8c5194361de9f691a20a4f31c4945c8c95f9268b
Author: Brian Norris <computersforpeace at gmail.com>
AuthorDate: Thu Aug 15 22:44:57 2013 -0700
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Sun Oct 27 16:27:02 2013 -0700
mtd: onenand: remove redundant offset check
The mtd_block_isbad() interface already checks for this.
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/onenand/onenand_base.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index b3f41f2..7b7c1d2 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -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);
More information about the linux-mtd-cvs
mailing list