aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nand
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2011-10-23 12:02:57 +0800
committerØyvind Harboe <oyvindharboe@gmail.com>2011-10-23 14:32:11 +0000
commit7b94f4c99d7f7970c4f8bf51d477d88b93a4278c (patch)
tree7e079132b0ace059b6335453f3ad820651a0fe60 /src/flash/nand
parent343204927656561dd3deec52c58c13ef2de4f60b (diff)
downloadriscv-openocd-7b94f4c99d7f7970c4f8bf51d477d88b93a4278c.zip
riscv-openocd-7b94f4c99d7f7970c4f8bf51d477d88b93a4278c.tar.gz
riscv-openocd-7b94f4c99d7f7970c4f8bf51d477d88b93a4278c.tar.bz2
NAND/CORE: fix clang warning
The fix is inline with the Linux coding style that forbids assignment in if condition Change-Id: I42a371d6adfdf3b3fb867705211c47d89776ee2a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/85 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src/flash/nand')
-rw-r--r--src/flash/nand/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flash/nand/core.c b/src/flash/nand/core.c
index 03deabd..d9bb7de 100644
--- a/src/flash/nand/core.c
+++ b/src/flash/nand/core.c
@@ -598,7 +598,8 @@ int nand_erase(struct nand_device *nand, int first_block, int last_block)
return ERROR_NAND_OPERATION_TIMEOUT;
}
- if ((retval = nand_read_status(nand, &status)) != ERROR_OK)
+ retval = nand_read_status(nand, &status);
+ if (retval != ERROR_OK)
{
LOG_ERROR("couldn't read status");
return ERROR_NAND_OPERATION_FAILED;