summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/itest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/itest.c b/cmd/itest.c
index 91ae5c2..fb4d797 100644
--- a/cmd/itest.c
+++ b/cmd/itest.c
@@ -59,7 +59,7 @@ static long evalexp(char *s, int w)
if (s[0] == '*') {
addr = simple_strtoul(&s[1], NULL, 16);
buf = map_physmem(addr, w, MAP_WRBACK);
- if (!buf) {
+ if (!buf && addr) {
puts("Failed to map physical memory\n");
return 0;
}