Skip to content

Commit c39341c

Browse files
JuliaLawalltyhicks
authored andcommitted
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>
1 parent 33688ab commit c39341c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/ecryptfs/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,8 +738,7 @@ static void ecryptfs_free_kmem_caches(void)
738738
struct ecryptfs_cache_info *info;
739739

740740
info = &ecryptfs_cache_infos[i];
741-
if (*(info->cache))
742-
kmem_cache_destroy(*(info->cache));
741+
kmem_cache_destroy(*(info->cache));
743742
}
744743
}
745744

0 commit comments

Comments
 (0)