summaryrefslogtreecommitdiff
path: root/common/cmd_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_mem.c')
-rw-r--r--common/cmd_mem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 4262e26..d6d7a5b 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -492,7 +492,11 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
/* Check if we are copying from DataFlash to RAM */
- if (addr_dataflash(addr) && !addr_dataflash(dest) && (addr2info(dest)==NULL) ){
+ if (addr_dataflash(addr) && !addr_dataflash(dest)
+#ifndef CFG_NO_FLASH
+ && (addr2info(dest) == NULL)
+#endif
+ ){
int rc;
rc = read_dataflash(addr, count * size, (char *) dest);
if (rc != 1) {