Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c46adf09 authored by Xiaolei Li's avatar Xiaolei Li Committed by Brian Norris
Browse files

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: default avatarXiaolei Li <xiaolei.li@mediatek.com>
Reviewed-by: default avatarRichard Weinberger <richard@nod.at>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 4379075a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ static int write_eraseblock2(int ebnum)
		if (unlikely(err || written != subpgsize * k)) {
			pr_err("error: write failed at %#llx\n",
			       (long long)addr);
			if (written != subpgsize) {
			if (written != subpgsize * k) {
				pr_err("  write size: %#x\n",
				       subpgsize * k);
				pr_err("  written: %#08zx\n",