[U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set
Guennadi Liakhovetski
g.liakhovetski at gmx.de
Wed Feb 13 11:19:19 CET 2008
Fix a missing return statement from a non-void function.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski at gmx.de>
---
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index f6bff54..c905304 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -695,6 +695,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 len;
@@ -725,7 +726,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) {
@@ -983,8 +983,8 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
incr = -incr;
}
- return rcode;
#endif
+ return rcode;
}
More information about the U-Boot
mailing list