diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-12-05 14:40:06 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2009-12-05 14:40:06 -0800 |
commit | dd9d1a3459f7b38e2af99bdbafd322cacc9dacc2 (patch) | |
tree | 33219999ffbd1aa191ff1a5262364f962a9d60cd /src/flash | |
parent | 12b67a2b41557160b8daa23305cbc30a349588c1 (diff) | |
download | openocd+libswd-dd9d1a3459f7b38e2af99bdbafd322cacc9dacc2.tar.gz openocd+libswd-dd9d1a3459f7b38e2af99bdbafd322cacc9dacc2.tar.bz2 openocd+libswd-dd9d1a3459f7b38e2af99bdbafd322cacc9dacc2.tar.xz openocd+libswd-dd9d1a3459f7b38e2af99bdbafd322cacc9dacc2.zip |
misc code review updates
More updates from the code review by Steve Grubb <sgrubb@redhat.com>.
The Jim float-comparision bug just gets a comment not a fix, though.
Cc: Steve Grubb <sgrubb@redhat.com>.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/mflash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c index aa02e157..123d61ce 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -342,7 +342,8 @@ static int mg_dsk_drv_info(void) if ((ret = mg_dsk_io_cmd(0, 1, mg_io_cmd_identify)) != ERROR_OK) return ret; - if ((ret = mg_dsk_wait(mg_io_wait_drq, MG_OEM_DISK_WAIT_TIME_NORMAL)) != ERROR_OK) + ret = mg_dsk_wait(mg_io_wait_drq, MG_OEM_DISK_WAIT_TIME_NORMAL); + if (ret != ERROR_OK) return ret; LOG_INFO("mflash: read drive info"); @@ -350,7 +351,8 @@ static int mg_dsk_drv_info(void) if (! mflash_bank->drv_info) mflash_bank->drv_info = malloc(sizeof(struct mg_drv_info)); - target_read_memory(target, mg_buff, 2, sizeof(mg_io_type_drv_info) >> 1, + ret = target_read_memory(target, mg_buff, 2, + sizeof(mg_io_type_drv_info) >> 1, (uint8_t *)&mflash_bank->drv_info->drv_id); if (ret != ERROR_OK) return ret; |