From: Fabian Frederick Date: Mon, 16 Jun 2014 18:06:12 +0000 (+0200) Subject: fs/ecryptfs/messaging.c: remove null test before kfree X-Git-Tag: v3.18-rc1~93^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3db593e8af0a7361037a2abbe8910d4e44041d89;p=karo-tx-linux.git fs/ecryptfs/messaging.c: remove null test before kfree Fix checkpatch warning: WARNING: kfree(NULL) is safe this check is probably not required Signed-off-by: Fabian Frederick Cc: ecryptfs@vger.kernel.org Signed-off-by: Tyler Hicks --- diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index e57380e5f6bd..286f10b0363b 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c @@ -434,8 +434,7 @@ void ecryptfs_release_messaging(void) mutex_lock(&ecryptfs_msg_ctx_lists_mux); for (i = 0; i < ecryptfs_message_buf_len; i++) { mutex_lock(&ecryptfs_msg_ctx_arr[i].mux); - if (ecryptfs_msg_ctx_arr[i].msg) - kfree(ecryptfs_msg_ctx_arr[i].msg); + kfree(ecryptfs_msg_ctx_arr[i].msg); mutex_unlock(&ecryptfs_msg_ctx_arr[i].mux); } kfree(ecryptfs_msg_ctx_arr);