From a37e3836e22a12a73063bb739002337de9c0c4e7 Mon Sep 17 00:00:00 2001 From: ntfreak Date: Tue, 3 Jun 2008 19:36:42 +0000 Subject: - str9 driver remove the duplicate target_free_working_area and reformat spaces to tabs. - lpc2000 driver reorder function so as to not require goto, plus refornat spaces to tabs. git-svn-id: svn://svn.berlios.de/openocd/trunk@699 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/flash/str9x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/flash/str9x.c') diff --git a/src/flash/str9x.c b/src/flash/str9x.c index 2904d565..96cad399 100644 --- a/src/flash/str9x.c +++ b/src/flash/str9x.c @@ -397,16 +397,15 @@ int str9x_write_block(struct flash_bank_s *bank, u8 *buffer, u32 offset, u32 cou if ((retval = target->type->run_algorithm(target, 0, NULL, 4, reg_params, str9x_info->write_algorithm->address, str9x_info->write_algorithm->address + (18 * 4), 10000, &armv4_5_info)) != ERROR_OK) { - target_free_working_area(target, source); - target_free_working_area(target, str9x_info->write_algorithm); LOG_ERROR("error executing str9x flash write algorithm"); + retval = ERROR_FLASH_OPERATION_FAILED; break; } if (buf_get_u32(reg_params[3].value, 0, 32) != 0x80) { retval = ERROR_FLASH_OPERATION_FAILED; - break; + break; } buffer += thisrun_count * 2; -- cgit v1.2.3