summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_close.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-01 01:59:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-01 01:59:11 +0000
commitd70a972659915d79d44b95b8e01f7d641a583958 (patch)
tree7d69357ed6391dc940efee4a0446e0e10e4048d9 /nuttx/fs/fs_close.c
parent081297ae419d1986ef51d7b4326f3573004b04e8 (diff)
downloadpx4-nuttx-d70a972659915d79d44b95b8e01f7d641a583958.tar.gz
px4-nuttx-d70a972659915d79d44b95b8e01f7d641a583958.tar.bz2
px4-nuttx-d70a972659915d79d44b95b8e01f7d641a583958.zip
Fix missing lock in last change
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@793 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_close.c')
-rw-r--r--nuttx/fs/fs_close.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/nuttx/fs/fs_close.c b/nuttx/fs/fs_close.c
index 6a152540d..03c0769e4 100644
--- a/nuttx/fs/fs_close.c
+++ b/nuttx/fs/fs_close.c
@@ -132,7 +132,7 @@ int close(int fd)
* vtable.
*/
- ret = files_close(&list->fl_files[fd]);
+ ret = files_close(fd);
if (ret < 0)
{
/* An error occurred while closing the driver */
@@ -140,15 +140,12 @@ int close(int fd)
err = -ret;
goto errout;
}
-
- /* Release the file descriptor */
-
- files_release(fd);
return OK;
+
#endif
errout:
- *get_errno_ptr() = err;
+ errno = err;
return ERROR;
}