zsmalloc: Delete an unnecessary check before the function call "iput"
Subsystems (2)
[email protected]
maintainerPATCH 90/101 zsmalloc: Delete an unnecessary check before the function call "iput"
From: Markus Elfring <[email protected]>
Subject: 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.
Signed-off-by Markus Elfring <[email protected]>
Reviewed-by Sergey Senozhatsky <[email protected]>
Acked-by Minchan Kim <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/zsmalloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
mm/zsmalloc.c renamed from mm/zsmalloc.c~zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput +1 -2
@@ -2174,8 +2174,7 @@ static int zs_register_migration(structstatic void zs_unregister_migration (struct zs_pool *pool) {flush_work (&pool->free_work); -if (pool->inode) -iput (pool->inode); +iput (pool->inode); }/*
_