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>
This commit is contained in:
@@ -210,7 +210,7 @@ static void kw_sysrst_action(void)
|
||||
|
||||
debug("Starting %s process...\n", __FUNCTION__);
|
||||
ret = run_command(s, 0);
|
||||
if (ret < 0)
|
||||
if (ret != 0)
|
||||
debug("Error.. %s failed\n", __FUNCTION__);
|
||||
else
|
||||
debug("%s process finished\n", __FUNCTION__);
|
||||
|
||||
Reference in New Issue
Block a user