summaryrefslogtreecommitdiff
path: root/src/flash/nor/pic32mx.c
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2011-01-03 13:30:28 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-01-03 13:33:27 +0100
commitc69553cbc51770f61cf3b9225d46d058fa2544d0 (patch)
tree07aa7f6d5bc1861cc926e2359034ef42f17dc46a /src/flash/nor/pic32mx.c
parent1795239cfda77315ea2f4fbc028e7a411d13a7d0 (diff)
downloadopenocd+libswd-c69553cbc51770f61cf3b9225d46d058fa2544d0.tar.gz
openocd+libswd-c69553cbc51770f61cf3b9225d46d058fa2544d0.tar.bz2
openocd+libswd-c69553cbc51770f61cf3b9225d46d058fa2544d0.tar.xz
openocd+libswd-c69553cbc51770f61cf3b9225d46d058fa2544d0.zip
error handling: the error number is not part of the user interface
Do not propagate error number to user. This is for internal programming purposes only. Error messages to the user is reported as text via LOG_ERROR(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/flash/nor/pic32mx.c')
-rw-r--r--src/flash/nor/pic32mx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c
index 6a277021..89fe9b05 100644
--- a/src/flash/nor/pic32mx.c
+++ b/src/flash/nor/pic32mx.c
@@ -513,8 +513,8 @@ static int pic32mx_write(struct flash_bank *bank, uint8_t *buffer, uint32_t offs
}
else if (retval == ERROR_FLASH_OPERATION_FAILED)
{
- LOG_ERROR("flash writing failed with error code: 0x%x", retval);
- return ERROR_FLASH_OPERATION_FAILED;
+ LOG_ERROR("flash writing failed");
+ return retval;
}
}
else