diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c index 3c3c511d74..3d863c4f98 100644 --- a/components/dfs/src/dfs_posix.c +++ b/components/dfs/src/dfs_posix.c @@ -449,7 +449,7 @@ int fcntl(int fildes, int cmd, ...) } else ret = -EBADF; - if (ret != 0) + if (ret < 0) { rt_set_errno(ret); ret = -1;