diff options
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 |
commit | 740b9e25b410c164e661d0334a9ea4168406726b (patch) | |
tree | 0c396aab2d3287a0bb38b6d9bf3921d12d273740 /src/jtag/drivers/parport.c | |
parent | 5cd931ed1ccc75bdbaab821686ceff04c3cb002b (diff) |
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/parport.c')
-rw-r--r-- | src/jtag/drivers/parport.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c index 2323ec56..3402bc2a 100644 --- a/src/jtag/drivers/parport.c +++ b/src/jtag/drivers/parport.c @@ -384,7 +384,9 @@ static int parport_init(void) bitbang_interface = &parport_bitbang; - wait_states = jtag_get_speed(); + int retval = jtag_get_speed(&wait_states); + if (retval != ERROR_OK) + return retval; return ERROR_OK; } @@ -475,7 +477,9 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command) } parport_toggling_time_ns = ns; - wait_states = jtag_get_speed(); + int retval = jtag_get_speed(&wait_states); + if (retval != ERROR_OK) + return retval; } command_print(CMD_CTX, "parport toggling time = %" PRIu32 " ns", |