summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests
diff options
context:
space:
mode:
authorXiaolei Li <xiaolei.li@mediatek.com>2017-06-01 17:01:19 +0800
committerBrian Norris <computersforpeace@gmail.com>2017-06-08 16:39:21 -0700
commitc46adf0976eacadd60920da5b8bf8e27299183bd (patch)
tree18ce3139599ccae5357a5c4f0d72528658dc8ed2 /drivers/mtd/tests
parent4379075a870b8de43a9ecd5b46884953234fc669 (diff)
downloadlinux-c46adf0976eacadd60920da5b8bf8e27299183bd.tar.bz2
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>
Diffstat (limited to 'drivers/mtd/tests')
-rw-r--r--drivers/mtd/tests/subpagetest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/tests/subpagetest.c b/drivers/mtd/tests/subpagetest.c
index aecc6ce5a9e1..fa2519ad2435 100644
--- a/drivers/mtd/tests/subpagetest.c
+++ b/drivers/mtd/tests/subpagetest.c
@@ -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",