shm: Remove silly double assignment
authorNeil Horman <nhorman@tuxdriver.com>
Tue, 10 Jun 2008 12:53:39 +0000 (08:53 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Jun 2008 14:58:00 +0000 (07:58 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/shm.c

index 554429a..d05f6b5 100644 (file)
--- 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;