mtd: subpagetest: fix wrong written check in function write_eraseblock2
authorXiaolei Li <xiaolei.li@mediatek.com>
Thu, 1 Jun 2017 09:01:19 +0000 (17:01 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 8 Jun 2017 23:39:21 +0000 (16:39 -0700)
commitc46adf0976eacadd60920da5b8bf8e27299183bd
tree18ce3139599ccae5357a5c4f0d72528658dc8ed2
parent4379075a870b8de43a9ecd5b46884953234fc669
mtd: subpagetest: fix wrong written check in function write_eraseblock2

Write size in function write_eraseblock2 is subpgsize * k.
It is wrong to check whether written is equal to subpgsize after each
mtd_write.

Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/tests/subpagetest.c