Commit c3491eca authored by Markus Elfring's avatar Markus Elfring Committed by Linus Torvalds

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.netSigned-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-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 fb399b48
...@@ -2174,7 +2174,6 @@ static int zs_register_migration(struct zs_pool *pool) ...@@ -2174,7 +2174,6 @@ static int zs_register_migration(struct zs_pool *pool)
static void zs_unregister_migration(struct zs_pool *pool) static void zs_unregister_migration(struct zs_pool *pool)
{ {
flush_work(&pool->free_work); flush_work(&pool->free_work);
if (pool->inode)
iput(pool->inode); iput(pool->inode);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment