Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd10add0 authored by Sergey Senozhatsky's avatar Sergey Senozhatsky Committed by Linus Torvalds
Browse files

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: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b3e237f1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -288,7 +288,6 @@ 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);
}