This is an automated email from Gerrit. "Kirill Radkin <kirill.rad...@syntacore.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7940
-- gerrit commit 57f785e0d1d7c51fd020ef79f88694238b0f963c Author: Kirill Radkin <kirill.rad...@syntacore.com> Date: Wed Oct 18 19:13:25 2023 +0300 breakpoints: Fix endless loop in bp/wp_clear_target If we can't remove bp/wp, we will stuck in endless loop Change-Id: I44c0a164db1d15c0a0637d33c75087a49cf5c0f4 Signed-off-by: Kirill Radkin <kirill.rad...@syntacore.com> diff --git a/src/target/breakpoints.c b/src/target/breakpoints.c index 07d0a73710..19169dc303 100644 --- a/src/target/breakpoints.c +++ b/src/target/breakpoints.c @@ -474,7 +474,7 @@ static int breakpoint_clear_target_internal(struct target *target) while (target->breakpoints) { int status = breakpoint_free(target, target->breakpoints); if (status != ERROR_OK) - retval = status; + return retval; } return retval; @@ -666,7 +666,7 @@ int watchpoint_clear_target(struct target *target) while (target->watchpoints) { int status = watchpoint_free(target, target->watchpoints); if (status != ERROR_OK) - retval = status; + return status; } return retval; --