Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
[firefly-linux-kernel-4.4.55.git] / drivers / dma / dmaengine.c
index 09479d4be4db3d776fd1f3400724d13f26808428..3ecec1445adfc9d76408fd88fb55ed5c8b79d98c 100644 (file)
@@ -1074,11 +1074,9 @@ static void dmaengine_destroy_unmap_pool(void)
        for (i = 0; i < ARRAY_SIZE(unmap_pool); i++) {
                struct dmaengine_unmap_pool *p = &unmap_pool[i];
 
-               if (p->pool)
-                       mempool_destroy(p->pool);
+               mempool_destroy(p->pool);
                p->pool = NULL;
-               if (p->cache)
-                       kmem_cache_destroy(p->cache);
+               kmem_cache_destroy(p->cache);
                p->cache = NULL;
        }
 }