Øyvind Harboe wrote: > If the JTAG speed has not been set, then it has no defined > value, add code to propagate the error. > > Signed-off-by: Øyvind Harboe <oyvind.har...@zylin.com> .. > +++ b/src/jtag/core.c > @@ -1384,9 +1384,13 @@ int adapter_init(struct command_context *cmd_ctx) > > int requested_khz = jtag_get_speed_khz(); > int actual_khz = requested_khz; > - int retval = jtag_get_speed_readable(&actual_khz); > + int jtag_speed_t;
I'm not very happy with _t at the end of a variable name; that's usually for types. > + int retval = jtag_get_speed(&jtag_speed_t); > + if (retval != ERROR_OK) > + return retval; > + retval = jtag_get_speed_readable(&actual_khz); > if (ERROR_OK != retval) > - LOG_INFO("adapter-specific clock speed value %d", > jtag_get_speed()); > + LOG_INFO("adapter-specific clock speed value %d", jtag_speed_t); Why not also print actual_khz here? Otherwise: Acked-by: Peter Stuge <pe...@stuge.se> _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development