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

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


The following commit(s) were added to refs/heads/master by this push:
     new d63056bd72 fs/semaphore: fix a minor issue with goto label
d63056bd72 is described below

commit d63056bd728271b99da83b88f5a02f7bf1ab4ad9
Author: fangxinyong <[email protected]>
AuthorDate: Sat Aug 24 14:09:33 2024 +0800

    fs/semaphore: fix a minor issue with goto label
    
    Signed-off-by: fangxinyong <[email protected]>
---
 fs/semaphore/sem_open.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/semaphore/sem_open.c b/fs/semaphore/sem_open.c
index e063000895..40bd221857 100644
--- a/fs/semaphore/sem_open.c
+++ b/fs/semaphore/sem_open.c
@@ -153,7 +153,7 @@ int nxsem_open(FAR sem_t **sem, FAR const char *name, int 
oflags, ...)
           /* The semaphore does not exist and O_CREAT is not set */
 
           ret = -ENOENT;
-          goto errout_with_lock;
+          goto errout_with_search;
         }
 
       /* Create the semaphore.  First we have to extract the additional
@@ -171,7 +171,7 @@ int nxsem_open(FAR sem_t **sem, FAR const char *name, int 
oflags, ...)
       if (value > SEM_VALUE_MAX)
         {
           ret = -EINVAL;
-          goto errout_with_lock;
+          goto errout_with_search;
         }
 
       /* Create an inode in the pseudo-filesystem at this path.  The new
@@ -184,7 +184,7 @@ int nxsem_open(FAR sem_t **sem, FAR const char *name, int 
oflags, ...)
 
       if (ret < 0)
         {
-          goto errout_with_lock;
+          goto errout_with_search;
         }
 
       /* Allocate the semaphore structure (using the appropriate allocator
@@ -226,7 +226,7 @@ int nxsem_open(FAR sem_t **sem, FAR const char *name, int 
oflags, ...)
 errout_with_inode:
   inode_release(inode);
 
-errout_with_lock:
+errout_with_search:
   RELEASE_SEARCH(&desc);
   return ret;
 }

Reply via email to