target: fix missing semihosting return path
authorSpencer Oliver <spen@spen-soft.co.uk>
Mon, 9 Jan 2012 21:35:19 +0000 (21:35 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 12 Jan 2012 20:38:24 +0000 (20:38 +0000)
bug nicely caught by clang.

Change-Id: I7abf0fdd76666fb3eb1c83e3edfd01e0da485ffe
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/359
Tested-by: jenkins
Reviewed-by: √ėyvind Harboe <oyvindharboe@gmail.com>
src/target/armv4_5.c

index 706733d..7468e38 100644 (file)
@@ -966,6 +966,7 @@ COMMAND_HANDLER(handle_arm_semihosting_command)
        if (!arm->setup_semihosting)
        {
                command_print(CMD_CTX, "semihosting not supported for current target");
        if (!arm->setup_semihosting)
        {
                command_print(CMD_CTX, "semihosting not supported for current target");
+               return ERROR_FAIL;
        }
 
        if (CMD_ARGC > 0)
        }
 
        if (CMD_ARGC > 0)