* [patch 090/101] zsmalloc: Delete an unnecessary check before the function call "iput"
@ 2016-07-28 22:48 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-28 22:48 UTC (permalink / raw)
To: torvalds, mm-commits, akpm, elfring, minchan, sergey.senozhatsky
From: Markus Elfring <elfring@users.sourceforge.net>
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.
Link: http://lkml.kernel.org/r/559cf499-4a01-25f9-c87f-24d906626a57@users.sourceforge.net
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/zsmalloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -puN mm/zsmalloc.c~zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput mm/zsmalloc.c
--- a/mm/zsmalloc.c~zsmalloc-delete-an-unnecessary-check-before-the-function-call-iput
+++ a/mm/zsmalloc.c
@@ -2174,8 +2174,7 @@ static int zs_register_migration(struct
static void zs_unregister_migration(struct zs_pool *pool)
{
flush_work(&pool->free_work);
- if (pool->inode)
- iput(pool->inode);
+ iput(pool->inode);
}
/*
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-28 22:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 22:48 [patch 090/101] zsmalloc: Delete an unnecessary check before the function call "iput" akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.