aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorThomas Betker <thomas.betker@freenet.de>2014-06-05 20:07:56 +0200
committerTom Rini <trini@ti.com>2014-06-11 16:25:47 -0400
commit73671dad49bf2368959b7bf0e30ba931ea95565c (patch)
treeab8bfdab55cc81119814c5eb4a6ff782e88b3705 /board
parent32e2c42a83e8676511e178e0285ea634bc4564fd (diff)
downloadu-boot-73671dad49bf2368959b7bf0e30ba931ea95565c.zip
u-boot-73671dad49bf2368959b7bf0e30ba931ea95565c.tar.gz
u-boot-73671dad49bf2368959b7bf0e30ba931ea95565c.tar.bz2
Check run_command() return code properly
run_command() returns 0 for success, 1 for failure. Fix places which assume that failure is indicated by a negative return code. Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/gdsys/p1022/controlcenterd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c
index 8ccd9ce..642b807 100644
--- a/board/gdsys/p1022/controlcenterd.c
+++ b/board/gdsys/p1022/controlcenterd.c
@@ -221,11 +221,7 @@ void hw_watchdog_reset(void)
#ifdef CONFIG_TRAILBLAZER
int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- int rcode = 0;
-
- if (run_command(getenv("bootcmd"), flag) < 0)
- rcode = 1;
- return rcode;
+ return run_command(getenv("bootcmd"), flag);
}
int board_early_init_r(void)