diff --git a/src/drivers/device/vdev_posix.cpp b/src/drivers/device/vdev_posix.cpp index 86c2230526..44aea614cc 100644 --- a/src/drivers/device/vdev_posix.cpp +++ b/src/drivers/device/vdev_posix.cpp @@ -270,7 +270,7 @@ int px4_fsync(int fd) int px4_access(const char *pathname, int mode) { - if (mode == F_OK) { + if (mode != F_OK) { errno = EINVAL; return -1; }