target/armv4_5: drop goto and label

Drop the jumps to the label and the label.

Change-Id: I4e20684b06af09dcd749ae520e299c79ce67b467
Signed-off-by: Lucien Dufour <lucien.buchmann@dufour.aero>
Reviewed-on: https://review.openocd.org/c/openocd/+/9292
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
Lucien Dufour
2025-12-09 19:04:03 +01:00
committed by Antonio Borneo
parent 58eb7e31a6
commit daaf48b96f

View File

@@ -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)