projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb399b4
)
zsmalloc: Delete an unnecessary check before the function call "iput"
author
Markus Elfring
<
[email protected]
>
Thu, 28 Jul 2016 22:48:59 +0000
(15:48 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 28 Jul 2016 23:07:41 +0000
(16:07 -0700)
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/
[email protected]
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]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/zsmalloc.c
patch
|
blob
|
history
diff --git
a/mm/zsmalloc.c
b/mm/zsmalloc.c
index cd2a81e8b4295ebcd5b001c9ba4db55c43410435..b0bc023d25c539e05b5a874b65dcf575a136f271 100644
(file)
--- a/
mm/zsmalloc.c
+++ b/
mm/zsmalloc.c
@@
-2174,8
+2174,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);
}
/*