]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc: simplify free_copy() call
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Fri, 9 Nov 2012 03:05:08 +0000 (14:05 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 9 Nov 2012 03:09:08 +0000 (14:09 +1100)
commitd1dbfb2a6b03dce253654527bca927cb90376bc6
tree81be72ea9d9e944ef7bf29d7fffd2cbdfe6c560d
parent7b664740386a69eb3e3e589eccaecd32ce2affe2
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>
ipc/msg.c