The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] shm: Remove silly double assignment
@ 2008-06-10 12:53 Neil Horman
  2008-06-11 10:45 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Horman @ 2008-06-10 12:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo, nhorman, torvalds

    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
 ****************************************************/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-06-18 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10 12:53 [PATCH] shm: Remove silly double assignment Neil Horman
2008-06-11 10:45 ` Andrew Morton
2008-06-11 17:03   ` Neil Horman
2008-06-18 10:06     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox