summaryrefslogtreecommitdiff
path: root/src/jtag/drivers/usb_blaster.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-12-06 09:21:23 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-12-08 08:43:52 +0100
commit740b9e25b410c164e661d0334a9ea4168406726b (patch)
tree0c396aab2d3287a0bb38b6d9bf3921d12d273740 /src/jtag/drivers/usb_blaster.c
parent5cd931ed1ccc75bdbaab821686ceff04c3cb002b (diff)
downloadopenocd+libswd-740b9e25b410c164e661d0334a9ea4168406726b.tar.gz
openocd+libswd-740b9e25b410c164e661d0334a9ea4168406726b.tar.bz2
openocd+libswd-740b9e25b410c164e661d0334a9ea4168406726b.tar.xz
openocd+libswd-740b9e25b410c164e661d0334a9ea4168406726b.zip
jtag: getting the JTAG speed can fail
If the JTAG speed has not been set, then it has no defined value, add code to propagate the error. No change to actual behavior as no new failure paths have been introduced. This is a no-op patch to make subsequent patches smaller. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/jtag/drivers/usb_blaster.c')
-rw-r--r--src/jtag/drivers/usb_blaster.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jtag/drivers/usb_blaster.c b/src/jtag/drivers/usb_blaster.c
index 16790405..c9b88f86 100644
--- a/src/jtag/drivers/usb_blaster.c
+++ b/src/jtag/drivers/usb_blaster.c
@@ -442,7 +442,11 @@ static int usb_blaster_init(void)
bitbang_interface = &usb_blaster_bitbang;
- usb_blaster_speed(jtag_get_speed());
+ int jtag_speed_var;
+ int retval = jtag_get_speed(&jtag_speed_var);
+ if (retval != ERROR_OK)
+ return retval;
+ usb_blaster_speed(jtag_speed_var);
#if 0
#if BUILD_USB_BLASTER_FTD2XX == 1