ipc: simplify free_copy() call
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Fri, 4 Jan 2013 23:34:58 +0000 (15:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Jan 2013 00:11:45 +0000 (16:11 -0800)
commit85398aa8de1d68f44ff1b5d0ed9ceb2b0c51ce49
tree945dba3d9fdb7a607134955b50cdeedf6520d2dd
parent3a665531a3b7c2ad2c87903b24646be6916340e4
ipc: simplify free_copy() call

Passing and checking of msgflg to free_copy() is redundant.  This patch
sets copy to NULL on declaration instead and checks for non-NULL in
free_copy().

Note: in case of copy allocation failure, error is returned immediately.
So no need to check for IS_ERR() in free_copy().

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/msg.c