From: Rasmus Villemoes Date: Thu, 7 Jan 2016 10:36:04 +0000 (+0100) Subject: fix always succesful memory test X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=fea6730e1ce110dafd434e4592a0b489014de429;p=u-boot.git fix always succesful memory test 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 --- diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 9fb25840f1..efa39296ef 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -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; } /*