From: Brian Norris Date: Fri, 16 Aug 2013 05:44:57 +0000 (-0700) Subject: mtd: onenand: remove redundant offset check X-Git-Tag: MMI-PSA29.97-13-9~13292^2~89 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=53d66baef631ec7fa83dd1b161bf4c3ebabeb73e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mtd: onenand: remove redundant offset check The mtd_block_isbad() interface already checks for this. Signed-off-by: Brian Norris --- 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);