diff --git a/fs/fs.c b/fs/fs.c index b66cc9b..8a49e32 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -962,7 +962,7 @@ case SEEK_SET: if (f->size != FILE_SIZE_STREAM && offset > f->size) goto out; - if (offset < 0) + if (IS_ERR_VALUE(offset)) goto out; pos = offset; break; @@ -981,7 +981,7 @@ } pos = fsdrv->lseek(&f->fsdev->dev, f, pos); - if (pos < 0) { + if (IS_ERR_VALUE(pos)) { errno = -pos; return -1; }