From: Amerigo Wang Date: Wed, 16 Dec 2009 00:47:35 +0000 (-0800) Subject: ipc: remove unreachable code in sem.c X-Git-Tag: v2.6.33-rc1~71^2~65 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=e5cc9c7b1a3e7ae4d700d9fce168fb597bcfe9b6 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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;