diff options
| author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-09-13 08:15:21 -0400 |
|---|---|---|
| committer | Tyler Hicks <tyhicks@canonical.com> | 2016-06-20 11:02:22 -0400 |
| commit | c39341cf0d08357f448f4c2fffe2ebcc9495fd01 (patch) | |
| tree | c4ef593372802985b325d9726289cc54d6c96b63 /fs/ecryptfs | |
| parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) | |
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/)
// <smpl>
@@ expression x; @@
-if (x != NULL)
\(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'fs/ecryptfs')
| -rw-r--r-- | fs/ecryptfs/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 1698132d0e57..612004495141 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
| @@ -738,8 +738,7 @@ static void ecryptfs_free_kmem_caches(void) | |||
| 738 | struct ecryptfs_cache_info *info; | 738 | struct ecryptfs_cache_info *info; |
| 739 | 739 | ||
| 740 | info = &ecryptfs_cache_infos[i]; | 740 | info = &ecryptfs_cache_infos[i]; |
| 741 | if (*(info->cache)) | 741 | kmem_cache_destroy(*(info->cache)); |
| 742 | kmem_cache_destroy(*(info->cache)); | ||
| 743 | } | 742 | } |
| 744 | } | 743 | } |
| 745 | 744 | ||
