Skip to content
Snippets Groups Projects
Commit b10037a0 authored by HarishKumar's avatar HarishKumar Committed by Freddie Chopin
Browse files

Tcl commands: Fix improper return status in flash commands and load_image.


Nand write command :
nand_fileio_cleanup() always returns ERROR_OK. Due to this,
handle_nand_write_command() retuns ERROR_OK in the case
of nand failure. ERROR_FAIL should be returned.

Flash erase_sector command :
handle_flash_erase_command() always returns ERROR_OK even if
the erase functionality of actual driver implementation fails.
retval value should be returned.

Flash write_bank command :
handle_flash_write_bank_command() returns ERROR_OK even if
fileio_open() and fileio_read fails. ERROR_FAIL should be
returned.

Load_image command :
handle_load_image_command() retuns ERROR_OK even if image_open()
fails. ERROR_FAIL should be returned.
When the buffer is null, breaking the loop without setting
retval = ERROR_FAIL would cause load_image to return ERROR_OK.

Change-Id: Ice32f6036971ab5e8e4dd65edf54b394b001c80c
Signed-off-by: default avatarHarishKumar <harishpresent@gmail.com>
Reviewed-on: http://openocd.zylin.com/2431


Reviewed-by: default avatarAndreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
parent d3445cd1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment