aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/load.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/load.c b/cmd/load.c
index 381ed1b..3904e13 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -535,6 +535,9 @@ static ulong load_serial_bin(ulong offset)
udelay(1000);
}
+ if (size == 0)
+ return ~0; /* Download aborted */
+
flush_cache(offset, size);
printf("## Total Size = 0x%08x = %d Bytes\n", size, size);