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: WANG Cong <amwang@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/ipc/sem.c b/ipc/sem.c
index 82518d6..dbef95b 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -624,7 +624,7 @@
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) {
@@ -701,7 +701,6 @@
default:
return -EINVAL;
}
- return err;
out_unlock:
sem_unlock(sma);
return err;