]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc: simplify free_copy() call
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Thu, 29 Nov 2012 03:19:00 +0000 (14:19 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:48 +0000 (16:23 +1100)
commita4b6a69bf24afb8980d1108865eb969c47102a2b
tree102b603f2b013ffa869e65a38be727423ac1e483
parentaf02f2fdca0551456f39f6ca3004f4f637e54bc9
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