From 7dbaf3f5f4f1625ed7c821a02b0f6fcd5481fcb3 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Thu, 28 Jul 2016 15:48:59 -0700 Subject: [PATCH] zsmalloc: Delete an unnecessary check before the function call "iput" iput() tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Link: http://lkml.kernel.org/r/559cf499-4a01-25f9-c87f-24d906626a57@users.sourceforge.net Signed-off-by: Markus Elfring Reviewed-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/zsmalloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index c689617e6..f494a18d3 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -2218,8 +2218,7 @@ static int zs_register_migration(struct zs_pool *pool) static void zs_unregister_migration(struct zs_pool *pool) { flush_work(&pool->free_work); - if (pool->inode) - iput(pool->inode); + iput(pool->inode); } /*