summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/bootm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 9b0a158796..a714910315 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -274,7 +274,7 @@ struct image_handle *map_image(const char *filename, int verify)
len = ntohl(header->ih_size);
handle->data = memmap(fd, PROT_READ);
- if (!handle->data) {
+ if (handle->data == (void *)-1) {
handle->data = xmalloc(len);
handle->flags = IH_MALLOC;
if (read(fd, handle->data, len) < 0) {