|
@@ -2409,8 +2409,8 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
|
|
|
blockmask = (1 << (chip->phys_erase_shift - chip->page_shift)) - 1;
|
|
|
|
|
|
/* Invalidate the page cache, when we write to the cached page */
|
|
|
- if (to <= (chip->pagebuf << chip->page_shift) &&
|
|
|
- (chip->pagebuf << chip->page_shift) < (to + ops->len))
|
|
|
+ if (to <= ((loff_t)chip->pagebuf << chip->page_shift) &&
|
|
|
+ ((loff_t)chip->pagebuf << chip->page_shift) < (to + ops->len))
|
|
|
chip->pagebuf = -1;
|
|
|
|
|
|
/* Don't allow multipage oob writes with offset */
|