Skip to content

Commit

Permalink
ipc: remove unreachable code in sem.c
Browse files Browse the repository at this point in the history
This line is unreachable, remove it.

[akpm@linux-foundation.org: remove unneeded initialisation of `err']
Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Amerigo Wang authored and Linus Torvalds committed Dec 16, 2009
1 parent d987f8b commit e5cc9c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ipc/sem.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ static unsigned long copy_semid_to_user(void __user *buf, struct semid64_ds *in,
static int semctl_nolock(struct ipc_namespace *ns, int semid,
int cmd, int version, union semun arg)
{
int err = -EINVAL;
int err;
struct sem_array *sma;

switch(cmd) {
Expand Down Expand Up @@ -701,7 +701,6 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
default:
return -EINVAL;
}
return err;
out_unlock:
sem_unlock(sma);
return err;
Expand Down

0 comments on commit e5cc9c7

Please sign in to comment.