flash/nor/pic32mx: Remove redundant error message
The correct syntax is already suggested due to the return value used. While at it, apply some minor code improvements. Change-Id: I990c0f7a0871f4b1a0fcdd13afc190149302443c Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8003 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
ea07b3c53a
commit
4e5b009a72
|
@ -866,10 +866,8 @@ COMMAND_HANDLER(pic32mx_handle_unlock_command)
|
|||
struct mips_ejtag *ejtag_info;
|
||||
int timeout = 10;
|
||||
|
||||
if (CMD_ARGC < 1) {
|
||||
command_print(CMD, "pic32mx unlock <bank>");
|
||||
if (CMD_ARGC != 1)
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
}
|
||||
|
||||
struct flash_bank *bank;
|
||||
int retval = CALL_COMMAND_HANDLER(flash_command_get_bank, 0, &bank);
|
||||
|
@ -932,7 +930,7 @@ static const struct command_registration pic32mx_exec_command_handlers[] = {
|
|||
.name = "unlock",
|
||||
.handler = pic32mx_handle_unlock_command,
|
||||
.mode = COMMAND_EXEC,
|
||||
.usage = "[bank_id]",
|
||||
.usage = "bank_id",
|
||||
.help = "Unlock/Erase entire device.",
|
||||
},
|
||||
COMMAND_REGISTRATION_DONE
|
||||
|
|
Loading…
Reference in New Issue