From e978e53c7710a3643abea628245a0e155ad4dfd9 Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Sat, 19 Jan 2019 14:58:49 +0100 Subject: [PATCH] flash/nor/stm32f1x: fix minor error messages Change-Id: I1e9e62979c4629c8ba1d5ae89ca7392259969eb6 Signed-off-by: Tomas Vanek Reviewed-on: http://openocd.zylin.com/4858 Tested-by: jenkins Reviewed-by: Christopher Head --- src/flash/nor/stm32f1x.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c index fbd7598283..a0144c260e 100644 --- a/src/flash/nor/stm32f1x.c +++ b/src/flash/nor/stm32f1x.c @@ -443,8 +443,10 @@ static int stm32x_protect(struct flash_bank *bank, int set, int first, int last) return retval; retval = stm32x_erase_options(bank); - if (retval != ERROR_OK) + if (retval != ERROR_OK) { + LOG_ERROR("stm32x failed to erase options"); return retval; + } for (int i = first; i <= last; i++) { if (set) @@ -1227,12 +1229,12 @@ COMMAND_HANDLER(stm32x_handle_unlock_command) return retval; 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; } 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; } -- 2.30.2