From dd9d1a3459f7b38e2af99bdbafd322cacc9dacc2 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sat, 5 Dec 2009 14:40:06 -0800 Subject: misc code review updates More updates from the code review by Steve Grubb . The Jim float-comparision bug just gets a comment not a fix, though. Cc: Steve Grubb . Signed-off-by: David Brownell --- src/flash/mflash.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/flash/mflash.c') 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; -- cgit v1.2.3