This is an automated email from Gerrit.

"Lucien Buchmann <[email protected]>" just uploaded a new patch set 
to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9292

-- gerrit

commit 22b9183287fe20d451264cf4a2fade0fda16c4c4
Author: Lucien Dufour <[email protected]>
Date:   Tue Dec 9 19:04:03 2025 +0100

    target/armv4_5: drop goto and label
    
    Drop the jumps to the label and the label.
    
    Change-Id: I4e20684b06af09dcd749ae520e299c79ce67b467
    Signed-off-by: Lucien Dufour <[email protected]>

diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index 1b3ca0cdbe..78bcc06ba6 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -1638,8 +1638,10 @@ int arm_checksum_memory(struct target *target,
                retval = target_write_u32(target,
                                crc_algorithm->address + i * sizeof(uint32_t),
                                le_to_h_u32(&arm_crc_code_le[i * 4]));
-               if (retval != ERROR_OK)
-                       goto cleanup;
+               if (retval != ERROR_OK) {
+                       target_free_working_area(target, crc_algorithm);
+                       return retval;
+               }
        }
 
        arm_algo.common_magic = ARM_COMMON_MAGIC;
@@ -1672,7 +1674,6 @@ int arm_checksum_memory(struct target *target,
        destroy_reg_param(&reg_params[0]);
        destroy_reg_param(&reg_params[1]);
 
-cleanup:
        target_free_working_area(target, crc_algorithm);
 
        return retval;
@@ -1719,8 +1720,10 @@ int arm_blank_check_memory(struct target *target,
                                check_algorithm->address
                                + i * sizeof(uint32_t),
                                le_to_h_u32(&check_code_le[i * 4]));
-               if (retval != ERROR_OK)
-                       goto cleanup;
+               if (retval != ERROR_OK) {
+                       target_free_working_area(target, check_algorithm);
+                       return retval;
+               }
        }
 
        arm_algo.common_magic = ARM_COMMON_MAGIC;
@@ -1752,7 +1755,6 @@ int arm_blank_check_memory(struct target *target,
        destroy_reg_param(&reg_params[1]);
        destroy_reg_param(&reg_params[2]);
 
-cleanup:
        target_free_working_area(target, check_algorithm);
 
        if (retval != ERROR_OK)

-- 

Reply via email to