flash/nor/stm32f1x: fix minor error messages
Change-Id: I1e9e62979c4629c8ba1d5ae89ca7392259969eb6 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4858 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com>
This commit is contained in:
parent
4b998cb5f5
commit
e978e53c77
|
@ -443,8 +443,10 @@ static int stm32x_protect(struct flash_bank *bank, int set, int first, int last)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
retval = stm32x_erase_options(bank);
|
retval = stm32x_erase_options(bank);
|
||||||
if (retval != ERROR_OK)
|
if (retval != ERROR_OK) {
|
||||||
|
LOG_ERROR("stm32x failed to erase options");
|
||||||
return retval;
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = first; i <= last; i++) {
|
for (int i = first; i <= last; i++) {
|
||||||
if (set)
|
if (set)
|
||||||
|
@ -1227,12 +1229,12 @@ COMMAND_HANDLER(stm32x_handle_unlock_command)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
if (stm32x_erase_options(bank) != ERROR_OK) {
|
if (stm32x_erase_options(bank) != ERROR_OK) {
|
||||||
command_print(CMD_CTX, "stm32x failed to unlock device");
|
command_print(CMD_CTX, "stm32x failed to erase options");
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stm32x_write_options(bank) != ERROR_OK) {
|
if (stm32x_write_options(bank) != ERROR_OK) {
|
||||||
command_print(CMD_CTX, "stm32x failed to lock device");
|
command_print(CMD_CTX, "stm32x failed to unlock device");
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue