Change return value on error.
[fw/openocd] / src / flash / nor / tms470.c
index bf708be2d90d889a4c277dfb1bf4aa2e048f7349..b28aee434625ce86e692b18cf003a76cc6ef43ca 100644 (file)
@@ -313,7 +313,6 @@ COMMAND_HANDLER(tms470_handle_flash_keyset_command)
 {
        if (CMD_ARGC > 4)
        {
-               command_print(CMD_CTX, "tms470 flash_keyset <key0> <key1> <key2> <key3>");
                return ERROR_COMMAND_SYNTAX_ERROR;
        }
        else if (CMD_ARGC == 4)
@@ -377,7 +376,6 @@ COMMAND_HANDLER(tms470_handle_osc_megahertz_command)
 {
        if (CMD_ARGC > 1)
        {
-               command_print(CMD_CTX, "tms470 osc_megahertz <MHz>");
                return ERROR_COMMAND_SYNTAX_ERROR;
        }
        else if (CMD_ARGC == 1)
@@ -406,7 +404,6 @@ COMMAND_HANDLER(tms470_handle_plldis_command)
 {
        if (CMD_ARGC > 1)
        {
-               command_print(CMD_CTX, "tms470 plldis <0 | 1>");
                return ERROR_COMMAND_SYNTAX_ERROR;
        }
        else if (CMD_ARGC == 1)
@@ -840,18 +837,21 @@ static int tms470_erase_sector(struct flash_bank *bank, int sector)
 static const struct command_registration tms470_any_command_handlers[] = {
        {
                .name = "flash_keyset",
+               .usage = "<key0> <key1> <key2> <key3>",
                .handler = tms470_handle_flash_keyset_command,
                .mode = COMMAND_ANY,
                .help = "tms470 flash_keyset <key0> <key1> <key2> <key3>",
        },
        {
                .name = "osc_megahertz",
+               .usage = "<MHz>",
                .handler = tms470_handle_osc_megahertz_command,
                .mode = COMMAND_ANY,
                .help = "tms470 osc_megahertz <MHz>",
        },
        {
                .name = "plldis",
+               .usage = "<0 | 1>",
                .handler = tms470_handle_plldis_command,
                .mode = COMMAND_ANY,
                .help = "tms470 plldis <0/1>",