ubi: no NULL check needed before kmem_cache_destroy
[oweals/u-boot.git] / drivers / mtd / ubi / attach.c
index 90fb74a5c966baeadf01e69c5ca6da9bb88d7e0f..33c176a77bdcb30ffea9c341da93c4a73885b1ec 100644 (file)
@@ -1205,8 +1205,7 @@ static void destroy_ai(struct ubi_attach_info *ai)
                }
        }
 
-       if (ai->aeb_slab_cache)
-               kmem_cache_destroy(ai->aeb_slab_cache);
+       kmem_cache_destroy(ai->aeb_slab_cache);
 
        kfree(ai);
 }