]> git.sur5r.net Git - openocd/commitdiff
error handling fix.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sat, 1 Mar 2008 08:41:02 +0000 (08:41 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sat, 1 Mar 2008 08:41:02 +0000 (08:41 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@405 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c

index e9802e17266fda05f55bb19da067d1f781201e4b..aba37f0fd71ad8ee426bbb1782c3d2912f7caf4c 100644 (file)
@@ -1189,17 +1189,16 @@ int MINIDRIVER(interface_jtag_execute_queue)(void)
        jtag_command_queue = NULL;
        last_comand_pointer = &jtag_command_queue;
 
-       jtag_error=ERROR_OK;
-
        return retval;
 }
 
 int jtag_execute_queue(void)
 {
        int retval=interface_jtag_execute_queue();
-       if (retval!=ERROR_OK)
-               return retval;
-       retval=jtag_error;
+       if (retval==ERROR_OK)
+       {
+               retval=jtag_error;
+       }
        jtag_error=ERROR_OK;
        return retval;
 }