mtd: nand: fix bug writing 1 byte less than page size
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / ubi / attach.c
index 68eea5befaf12c96db4063a32ab81c20a8abfd96..c1aaf0336cf2e389386b4a6f7c87a8609652b474 100644 (file)
@@ -1209,9 +1209,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);
 }