summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/onenand/onenand_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 3330ea06917c..f63b1db3ffb3 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -3165,10 +3165,10 @@ static int onenand_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
/* Check User/Factory boundary */
if (mode == MTD_OTP_USER) {
- if (((mtd->writesize * otp_pages) - (from + len)) < 0)
+ if (mtd->writesize * otp_pages < from + len)
return 0;
} else {
- if (((mtd->writesize * otp_pages) - len) < 0)
+ if (mtd->writesize * otp_pages < len)
return 0;
}
OpenPOWER on IntegriCloud