mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
allow jtag interfaces to lack commands
Allow JTAG interface drivers to skip registering an register_commands callback when it will just be empty.
This commit is contained in:
@@ -636,9 +636,12 @@ COMMAND_HANDLER(handle_interface_command)
|
||||
if (strcmp(CMD_ARGV[0], jtag_interfaces[i]->name) != 0)
|
||||
continue;
|
||||
|
||||
int retval = jtag_interfaces[i]->register_commands(CMD_CTX);
|
||||
if (ERROR_OK != retval)
|
||||
if (NULL != jtag_interfaces[i]->register_commands)
|
||||
{
|
||||
int retval = jtag_interfaces[i]->register_commands(CMD_CTX);
|
||||
if (ERROR_OK != retval)
|
||||
return retval;
|
||||
}
|
||||
|
||||
jtag_interface = jtag_interfaces[i];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user