From: openocd-gerrit <ope...@us...> - 2023-01-15 14:54:53
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 083100fca3c5fd019517e38028d26a6c8e33a364 (commit) from d0436b0cdabb2106701222628d78932c973a1e62 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 083100fca3c5fd019517e38028d26a6c8e33a364 Author: Tomas Vanek <va...@fb...> Date: Sat Oct 1 17:00:51 2022 +0200 target/armv7m: check error in armv7m_restore_context() Return error if arm.write_core_reg() fails. Change-Id: Ide8f5aa5958532b202dc9f5e13d3250a706d832d Signed-off-by: Tomas Vanek <va...@fb...> Reviewed-on: https://review.openocd.org/c/openocd/+/7238 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 93df5877e..1b85315de 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -182,8 +182,11 @@ int armv7m_restore_context(struct target *target) for (i = cache->num_regs - 1; i >= 0; i--) { struct reg *r = &cache->reg_list[i]; - if (r->exist && r->dirty) - armv7m->arm.write_core_reg(target, r, i, ARM_MODE_ANY, r->value); + if (r->exist && r->dirty) { + int retval = armv7m->arm.write_core_reg(target, r, i, ARM_MODE_ANY, r->value); + if (retval != ERROR_OK) + return retval; + } } return ERROR_OK; ----------------------------------------------------------------------- Summary of changes: src/target/armv7m.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |