You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2021/04/19 08:50:55 UTC

[incubator-nuttx] branch master updated: fs/inode: correct the return value

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 58bd046  fs/inode: correct the return value
58bd046 is described below

commit 58bd0468ab12b13541879cd73febaf6d71b1e843
Author: chao.an <an...@xiaomi.com>
AuthorDate: Tue Apr 6 17:33:18 2021 +0800

    fs/inode: correct the return value
    
    correct the return value of fs_getfilep() since the
    semaphore take may probably fail if the thread canceled
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 fs/inode/fs_files.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c
index 0894e9c..738c3ce 100644
--- a/fs/inode/fs_files.c
+++ b/fs/inode/fs_files.c
@@ -369,7 +369,7 @@ int fs_getfilep(int fd, FAR struct file **filep)
       _files_semgive(list);
     }
 
-  return OK;
+  return ret;
 }
 
 /****************************************************************************