summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2013-08-16 07:44:57 +0200
committerBrian Norris <computersforpeace@gmail.com>2013-10-28 00:27:02 +0100
commit53d66baef631ec7fa83dd1b161bf4c3ebabeb73e (patch)
treefbdb35a7458bd09e1add624fccf17a69bd09fda7 /drivers/mtd/onenand
parentmtd: denali: make init function static (diff)
downloadlinux-53d66baef631ec7fa83dd1b161bf4c3ebabeb73e.tar.xz
linux-53d66baef631ec7fa83dd1b161bf4c3ebabeb73e.zip
mtd: onenand: remove redundant offset check
The mtd_block_isbad() interface already checks for this. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/onenand')
-rw-r--r--drivers/mtd/onenand/onenand_base.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index b3f41f200622..7b7c1d21f612 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);