From: Julia Lawall Date: Sun, 13 Sep 2015 12:15:21 +0000 (+0200) Subject: ecryptfs: drop null test before destroy functions X-Git-Tag: v4.7-rc7~4^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c39341cf0d08357f448f4c2fffe2ebcc9495fd01;p=users%2Fdwmw2%2Flinux.git ecryptfs: drop null test before destroy functions Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // Signed-off-by: Julia Lawall Signed-off-by: Tyler Hicks --- diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 1698132d0e576..6120044951415 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -738,8 +738,7 @@ static void ecryptfs_free_kmem_caches(void) struct ecryptfs_cache_info *info; info = &ecryptfs_cache_infos[i]; - if (*(info->cache)) - kmem_cache_destroy(*(info->cache)); + kmem_cache_destroy(*(info->cache)); } }