Merge tag 'riscv-for-linus-4.20-mw3' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / lib / sg_pool.c
index 6dd3061..d1c1e63 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;