Skip to content
Snippets Groups Projects
Commit 620ecedf authored by zwelch's avatar zwelch
Browse files

Simplify logic in handle_jtag_speed_command.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2109 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent e468797e
Branches
No related tags found
No related merge requests found
......@@ -2146,6 +2146,8 @@ static int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cm
{
int retval = ERROR_OK;
if (argc > 1)
return ERROR_COMMAND_SYNTAX_ERROR;
if (argc == 1)
{
LOG_DEBUG("handle jtag speed");
......@@ -2156,15 +2158,8 @@ static int handle_jtag_speed_command(struct command_context_s *cmd_ctx, char *cm
/* this command can be called during CONFIG,
* in which case jtag isn't initialized */
if (jtag)
{
retval = jtag->speed(cur_speed);
}
} else if (argc == 0)
{
} else
{
return ERROR_COMMAND_SYNTAX_ERROR;
}
command_print(cmd_ctx, "jtag_speed: %d", jtag_speed);
return retval;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment