From 73671dad49bf2368959b7bf0e30ba931ea95565c Mon Sep 17 00:00:00 2001 From: Thomas Betker Date: Thu, 5 Jun 2014 20:07:56 +0200 Subject: 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 Acked-by: Simon Glass Tested-by: Simon Glass Tested-by: Stefan Roese --- board/gdsys/p1022/controlcenterd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'board') diff --git a/board/gdsys/p1022/controlcenterd.c b/board/gdsys/p1022/controlcenterd.c index 8ccd9ce6baa..642b807e801 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) -- cgit v1.2.3