diff options
| -rw-r--r-- | mm/zsmalloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 08bd7a3d464a..a8b5e749e84e 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c | |||
| @@ -289,7 +289,8 @@ static int create_handle_cache(struct zs_pool *pool) | |||
| 289 | 289 | ||
| 290 | static void destroy_handle_cache(struct zs_pool *pool) | 290 | static void destroy_handle_cache(struct zs_pool *pool) |
| 291 | { | 291 | { |
| 292 | kmem_cache_destroy(pool->handle_cachep); | 292 | if (pool->handle_cachep) |
| 293 | kmem_cache_destroy(pool->handle_cachep); | ||
| 293 | } | 294 | } |
| 294 | 295 | ||
| 295 | static unsigned long alloc_handle(struct zs_pool *pool) | 296 | static unsigned long alloc_handle(struct zs_pool *pool) |
