]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ipc: simplify free_copy() call
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Thu, 15 Nov 2012 02:38:44 +0000 (13:38 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 15 Nov 2012 06:32:17 +0000 (17:32 +1100)
commit022554b0a314d5f7632f31f0d9ad99a446a34716
treee34a134c672495bfcc0fdf923459f6affc4cc0b5
parent0552bb190a1a608b3124172cf018c2d38d4f6faf
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