fs/cromfs: Fix faulty DEBUGASSERT() check

The logic being tested is wrong, obviously when accessing file the
driver private data has to be valid (open() has been called).
This commit is contained in:
Ville Juven 2023-04-21 14:51:59 +03:00 committed by David Sidrane
parent 9f8d587b64
commit 30bae2ca47

View File

@ -1153,7 +1153,7 @@ static int cromfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
/* Sanity checks */
DEBUGASSERT(filep->f_priv == NULL && filep->f_inode != NULL);
DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL);
/* Get the mountpoint inode reference from the file structure and the
* volume private data from the inode structure