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

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

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

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


The following commit(s) were added to refs/heads/releases/10.1 by this push:
     new 893989e  fs/inode: correct the return value
893989e is described below

commit 893989e2f91ea4349afd78efa1ccbc482f4fed04
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;
 }
 
 /****************************************************************************