diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index a0ff2da18bee..22217b3205dc 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -290,7 +290,8 @@ static int create_handle_cache(struct zs_pool *pool) static void destroy_handle_cache(struct zs_pool *pool) { - kmem_cache_destroy(pool->handle_cachep); + if (pool->handle_cachep) + kmem_cache_destroy(pool->handle_cachep); } static unsigned long alloc_handle(struct zs_pool *pool)