diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2015-09-08 18:04:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-08 18:35:28 -0400 |
commit | cd10add00c1b31cd664a31108a9b395025def50a (patch) | |
tree | 20da258501150fc2c06424884ca1a46a29f91ca8 /mm | |
parent | b3e237f1f5a86030c875e186ff19640f4f4f3c63 (diff) |
zsmalloc: remove null check from destroy_handle_cache()
We can pass a NULL cache pointer to kmem_cache_destroy(), because it
NULL-checks its argument now. Remove redundant test from
destroy_handle_cache().
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/zsmalloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index c19b99c8a457..089120429c18 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c | |||
@@ -288,8 +288,7 @@ static int create_handle_cache(struct zs_pool *pool) | |||
288 | 288 | ||
289 | static void destroy_handle_cache(struct zs_pool *pool) | 289 | static void destroy_handle_cache(struct zs_pool *pool) |
290 | { | 290 | { |
291 | if (pool->handle_cachep) | 291 | kmem_cache_destroy(pool->handle_cachep); |
292 | kmem_cache_destroy(pool->handle_cachep); | ||
293 | } | 292 | } |
294 | 293 | ||
295 | static unsigned long alloc_handle(struct zs_pool *pool) | 294 | static unsigned long alloc_handle(struct zs_pool *pool) |