From: Tim Gardner Date: Tue, 12 Feb 2013 18:03:49 +0000 (-0700) Subject: ecryptfs: ecryptfs_msg_ctx_alloc_to_free(): remove kfree() redundant null check X-Git-Tag: upstream/snapshot3+hdmi~5560^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1101d58669a92ed9c9f4c7281404fb1e067a1e28;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ecryptfs: ecryptfs_msg_ctx_alloc_to_free(): remove kfree() redundant null check smatch analysis: fs/ecryptfs/messaging.c:101 ecryptfs_msg_ctx_alloc_to_free() info: redundant null check on msg_ctx->msg calling kfree() Cc: Dustin Kirkland Cc: ecryptfs@vger.kernel.org Signed-off-by: Tim Gardner Signed-off-by: Tyler Hicks --- diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index 5fa2471..d5c7297 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c @@ -97,8 +97,7 @@ static void ecryptfs_msg_ctx_free_to_alloc(struct ecryptfs_msg_ctx *msg_ctx) void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx) { list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list); - if (msg_ctx->msg) - kfree(msg_ctx->msg); + kfree(msg_ctx->msg); msg_ctx->msg = NULL; msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE; }