nand-bb: fix writing to the end of a .bb device
As nand_bb_write_buf calls mtd_write(bb->mtd, cur_ofs, now, ...) the
limit that now should be checked against is bb->mtd->size - cur_ofs.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e0ff988 commit faa369e9c55aa3b1f92bdb6a08d040af228ecedd
@Uwe Kleine-König Uwe Kleine-König authored on 1 Mar 2017
Sascha Hauer committed on 2 Mar 2017
Showing 1 changed file
View
drivers/mtd/nand/nand-bb.c