summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-09-13 14:15:10 +0200
committerNeilBrown <neilb@suse.com>2015-10-02 09:23:44 +0200
commit644df1a85fc4b0c7a16800f55717261546f4e651 (patch)
tree30ed717350163c534c5923d0557f5dafa4a43053 /drivers/md/raid5.c
parentmd: clear CHANGE_PENDING in readonly array (diff)
downloadlinux-644df1a85fc4b0c7a16800f55717261546f4e651.tar.xz
linux-644df1a85fc4b0c7a16800f55717261546f4e651.zip
md: 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: NeilBrown <neilb@suse.com>
Diffstat (limited to '')
-rw-r--r--drivers/md/raid5.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index d66ff723df45..49bb8d3ff9be 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -2271,8 +2271,7 @@ static void shrink_stripes(struct r5conf *conf)
drop_one_stripe(conf))
;
- if (conf->slab_cache)
- kmem_cache_destroy(conf->slab_cache);
+ kmem_cache_destroy(conf->slab_cache);
conf->slab_cache = NULL;
}