[PATCH] shm: Remove silly double assignment

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: <mingo@...>, <nhorman@...>, <torvalds@...>
Date: Tuesday, June 10, 2008 - 8:53 am

Found a silly double assignment of err is do_shmat.  Silly, but good to clean up
    the useless code.
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

diff --git a/ipc/shm.c b/ipc/shm.c
index 554429a..d05f6b5 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -894,8 +894,6 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
 	if (!sfd)
 		goto out_put_dentry;
 
-	err = -ENOMEM;
-
 	file = alloc_file(path.mnt, path.dentry, f_mode, &shm_file_operations);
 	if (!file)
 		goto out_free;
-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] shm: Remove silly double assignment, Neil Horman, (Tue Jun 10, 8:53 am)
Re: [PATCH] shm: Remove silly double assignment, Andrew Morton, (Wed Jun 11, 6:45 am)
Re: [PATCH] shm: Remove silly double assignment, Neil Horman, (Wed Jun 11, 1:03 pm)
Re: [PATCH] shm: Remove silly double assignment, Ingo Molnar, (Wed Jun 18, 6:06 am)