aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sg_pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sg_pool.c')
-rw-r--r--lib/sg_pool.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sg_pool.c b/lib/sg_pool.c
index 6dd30615a201..d1c1e6388eaa 100644
--- a/lib/sg_pool.c
+++ b/lib/sg_pool.c
@@ -148,10 +148,9 @@ static __init int sg_pool_init(void)
148cleanup_sdb: 148cleanup_sdb:
149 for (i = 0; i < SG_MEMPOOL_NR; i++) { 149 for (i = 0; i < SG_MEMPOOL_NR; i++) {
150 struct sg_pool *sgp = sg_pools + i; 150 struct sg_pool *sgp = sg_pools + i;
151 if (sgp->pool) 151
152 mempool_destroy(sgp->pool); 152 mempool_destroy(sgp->pool);
153 if (sgp->slab) 153 kmem_cache_destroy(sgp->slab);
154 kmem_cache_destroy(sgp->slab);
155 } 154 }
156 155
157 return -ENOMEM; 156 return -ENOMEM;