ti_icdi: add icdi_usb_query result check79/1279/2
authorSpencer Oliver <spen@spen-soft.co.uk>
Tue, 19 Mar 2013 14:14:51 +0000 (19 14:14 +0000)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sun, 31 Mar 2013 09:04:35 +0000 (31 09:04 +0000)
Change-Id: I0b40586677a77ee6ae46fe120a677616bde22d1e
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1279
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/jtag/drivers/ti_icdi_usb.c

index dcffd2f..9976451 100644 (file)
@@ -385,6 +385,8 @@ static int icdi_usb_query(void *handle)
 
        /* set extended mode */
        result = icdi_send_cmd(handle, "!");
+       if (result != ERROR_OK)
+               return result;
 
        /* check result */
        result = icdi_get_cmd_result(handle);