summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/flash/davinci_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/davinci_nand.c b/src/flash/davinci_nand.c
index ffd35608..29c96300 100644
--- a/src/flash/davinci_nand.c
+++ b/src/flash/davinci_nand.c
@@ -663,7 +663,7 @@ static int davinci_nand_device_command(struct command_context_s *cmd_ctx,
}
aemif = strtoul(argv[4], &ep, 0);
- if (*ep || chip == 0 || chip == ULONG_MAX) {
+ if (*ep || aemif == 0 || aemif == ULONG_MAX) {
LOG_ERROR("Invalid AEMIF controller address %s", argv[4]);
goto fail;
}