From: Sergey Senozhatsky Date: Tue, 8 Sep 2015 22:04:55 +0000 (-0700) Subject: zsmalloc: remove null check from destroy_handle_cache() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd10add00c1b31cd664a31108a9b395025def50a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) static void destroy_handle_cache(struct zs_pool *pool) { - if (pool->handle_cachep) - kmem_cache_destroy(pool->handle_cachep); + kmem_cache_destroy(pool->handle_cachep); } static unsigned long alloc_handle(struct zs_pool *pool)