From: Spencer Oliver Date: Tue, 19 Mar 2013 14:14:51 +0000 (+0000) Subject: ti_icdi: add icdi_usb_query result check X-Git-Tag: v0.7.0-rc1~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=900f2998c8edeffa35f57696314caf0fb543a5af;p=openocd ti_icdi: add icdi_usb_query result check Change-Id: I0b40586677a77ee6ae46fe120a677616bde22d1e Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/1279 Tested-by: jenkins Reviewed-by: Xiaofan Reviewed-by: Andreas Fritiofson --- diff --git a/src/jtag/drivers/ti_icdi_usb.c b/src/jtag/drivers/ti_icdi_usb.c index dcffd2fb..99764519 100644 --- a/src/jtag/drivers/ti_icdi_usb.c +++ b/src/jtag/drivers/ti_icdi_usb.c @@ -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);