From: Amerigo Wang Date: Wed, 16 Dec 2009 00:47:35 +0000 (-0800) Subject: ipc: remove unreachable code in sem.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e5cc9c7b1a3e7ae4d700d9fce168fb597bcfe9b6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 82518d6a96a3..dbef95b15941 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;