aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2009-12-15 16:47:35 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 07:20:10 -0800
commite5cc9c7b1a3e7ae4d700d9fce168fb597bcfe9b6 (patch)
tree567e8b359132aa0a542c2d940274727003c0c9f1 /ipc
parentd987f8b213f2cdcc52b2ca9ee67161516e4d256a (diff)
downloadkernel_samsung_crespo-e5cc9c7b1a3e7ae4d700d9fce168fb597bcfe9b6.zip
kernel_samsung_crespo-e5cc9c7b1a3e7ae4d700d9fce168fb597bcfe9b6.tar.gz
kernel_samsung_crespo-e5cc9c7b1a3e7ae4d700d9fce168fb597bcfe9b6.tar.bz2
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>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/sem.c3
1 files changed, 1 insertions, 2 deletions
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 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) {
@@ -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;