summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/lib/bootm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 8035468..1d487b9 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -314,7 +314,7 @@ static int do_bootz_linux(struct image_data *data)
image_size - sizeof(*header));
if (ret < 0)
goto err_out;
- if (ret < end - sizeof(*header)) {
+ if (ret < image_size - sizeof(*header)) {
printf("premature end of image\n");
ret = -EIO;
goto err_out;