summaryrefslogtreecommitdiffstats
path: root/common/uimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/uimage.c')
-rw-r--r--common/uimage.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/uimage.c b/common/uimage.c
index 3273bc1871..72b668e898 100644
--- a/common/uimage.c
+++ b/common/uimage.c
@@ -265,11 +265,12 @@ int uimage_verify(struct uimage_handle *handle)
{
u32 crc = 0;
int len, ret;
+ loff_t off;
void *buf;
- ret = lseek(handle->fd, sizeof(struct image_header), SEEK_SET);
- if (ret < 0)
- return ret;
+ off = sizeof(struct image_header);
+ if (lseek(handle->fd, off, SEEK_SET) != off)
+ return -errno;
buf = xmalloc(PAGE_SIZE);