Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[sfrench/cifs-2.6.git] / lib / sg_pool.c
index 6dd30615a201fde0e8f5c9a74a4a62427aa09c4e..d1c1e6388eaa735b6e6ec0b60b1ee9130ef40e82 100644 (file)
@@ -148,10 +148,9 @@ static __init int sg_pool_init(void)
 cleanup_sdb:
        for (i = 0; i < SG_MEMPOOL_NR; i++) {
                struct sg_pool *sgp = sg_pools + i;
-               if (sgp->pool)
-                       mempool_destroy(sgp->pool);
-               if (sgp->slab)
-                       kmem_cache_destroy(sgp->slab);
+
+               mempool_destroy(sgp->pool);
+               kmem_cache_destroy(sgp->slab);
        }
 
        return -ENOMEM;