summaryrefslogtreecommitdiff
path: root/cmd/sf.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/sf.c')
-rw-r--r--cmd/sf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/sf.c b/cmd/sf.c
index f971eec781..e7ff9a6462 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -287,7 +287,7 @@ static int do_spi_flash_read_write(int argc, char * const argv[])
}
buf = map_physmem(addr, len, MAP_WRBACK);
- if (!buf) {
+ if (!buf && addr) {
puts("Failed to map physical memory\n");
return 1;
}