summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/fs/fat/fs_fat32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index 0ff7935ca..5cb58463a 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -1763,8 +1763,8 @@ static int fat_bind(FAR struct inode *blkdriver, const void *data,
}
/* Initialize the allocated mountpt state structure. The filesystem is
- * responsible for one reference ont the blkdriver inode and does not
- * have to addref() here (but does have to release in ubind().
+ * responsible for one reference on the blkdriver inode and does not
+ * have to addref() here (but does have to release in unbind().
*/
fs->fs_blkdriver = blkdriver; /* Save the block driver reference */
@@ -1849,7 +1849,9 @@ static int fat_unbind(void *handle, FAR struct inode **blkdriver)
fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
}
+ sem_destroy(&fs->fs_sem);
kmm_free(fs);
+ return ret;
}
fat_semgive(fs);