All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set
@ 2008-02-13 10:19 Guennadi Liakhovetski
  2008-02-14 22:37 ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-02-13 10:19 UTC (permalink / raw)
  To: u-boot

Fix a missing return statement from a non-void function.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@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;
 }
 
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-15 20:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 10:19 [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set Guennadi Liakhovetski
2008-02-14 22:37 ` Wolfgang Denk
2008-02-15 20:03   ` Guennadi Liakhovetski
2008-02-15 20:26     ` Jon Loeliger
2008-02-15 20:45       ` Guennadi Liakhovetski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.