Skip to content

Commit

Permalink
fs/semaphore: fix a minor issue with goto label
Browse files Browse the repository at this point in the history
VELAPLATFO-41448

Change-Id: Ib14f0691a4677d855fc551236c4cb5e090551a9b
Signed-off-by: fangxinyong <[email protected]>
  • Loading branch information
fangxinyong committed Oct 8, 2024
1 parent 728ab32 commit 7219dfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/semaphore/sem_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7219dfb

Please sign in to comment.