summaryrefslogtreecommitdiff
path: root/drivers/usb/emul/sandbox_flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/emul/sandbox_flash.c')
-rw-r--r--drivers/usb/emul/sandbox_flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 24420e3d51e..b5176bb30ce 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -196,7 +196,7 @@ static int handle_ufi_command(struct sandbox_flash_priv *priv, const void *buff,
priv->fd != -1) {
offset = os_lseek(priv->fd, info->seek_block * info->block_size,
OS_SEEK_SET);
- if (offset == (off_t)-1)
+ if (offset < 0)
setup_fail_response(priv);
else
setup_response(priv);