mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:51:00 +07:00
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>
This commit is contained in:
parent
4379075a87
commit
c46adf0976
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user