]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
fix always succesful memory test
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Thu, 7 Jan 2016 10:36:04 +0000 (11:36 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 8 Jan 2016 15:15:47 +0000 (10:15 -0500)
Since 51209b1f42cb ("Use common mtest iteration counting"),
do_mem_mtest has always reported 0 errors and hence returned 0, even
if errors were detected. Fix the helpers mem_test_alt() and
mem_test_quick() to return the number of errors found.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
common/cmd_mem.c

index 9fb25840f10a2ec451b67b3c76c31127854e7e76..efa39296ef7a170e0f6463cd1a29c23bd446904b 100644 (file)
@@ -931,7 +931,7 @@ static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
                addr[offset] = 0;
        }
 
-       return 0;
+       return errs;
 }
 
 static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
@@ -990,7 +990,7 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
                val += incr;
        }
 
-       return 0;
+       return errs;
 }
 
 /*