提交 e5cc9c7b 编写于 作者: A Amerigo Wang 提交者: Linus Torvalds

ipc: remove unreachable code in sem.c

This line is unreachable, remove it.

[akpm@linux-foundation.org: remove unneeded initialisation of `err']
Signed-off-by: NWANG Cong <amwang@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d987f8b2
...@@ -624,7 +624,7 @@ static unsigned long copy_semid_to_user(void __user *buf, struct semid64_ds *in, ...@@ -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, static int semctl_nolock(struct ipc_namespace *ns, int semid,
int cmd, int version, union semun arg) int cmd, int version, union semun arg)
{ {
int err = -EINVAL; int err;
struct sem_array *sma; struct sem_array *sma;
switch(cmd) { switch(cmd) {
...@@ -701,7 +701,6 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid, ...@@ -701,7 +701,6 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
default: default:
return -EINVAL; return -EINVAL;
} }
return err;
out_unlock: out_unlock:
sem_unlock(sma); sem_unlock(sma);
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册