From: Guennadi Liakhovetski Date: Wed, 13 Feb 2008 10:19:19 +0000 (+0100) Subject: Fix return value of mtest when CFG_ALT_MEMTEST set X-Git-Tag: v1.3.2-rc1~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1f780aa6f17a5d79791d69ec1d2f66d76ac45d8e;p=u-boot Fix return value of mtest when CFG_ALT_MEMTEST set Fix a missing return statement from a non-void function. Signed-off-by: Guennadi Liakhovetski --- diff --git a/common/cmd_mem.c b/common/cmd_mem.c index a994211138..5fce773a9b 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -659,6 +659,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) vu_long *addr, *start, *end; ulong val; ulong readback; + int rcode = 0; #if defined(CFG_ALT_MEMTEST) vu_long addr_mask; @@ -689,7 +690,6 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #else ulong incr; ulong pattern; - int rcode = 0; #endif if (argc > 1) { @@ -954,8 +954,8 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } incr = -incr; } - return rcode; #endif + return rcode; }