projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f824b4
)
ipc: mqueue: remove unnecessary conditionals
author
Jingyu Wang
<jingyuwang_vip@163.com>
Thu, 8 Sep 2022 18:54:52 +0000
(
02:54
+0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:21:42 +0000
(14:21 -0700)
iput() already handles null and non-null parameters, so there is no need
to use if().
Link:
https://lkml.kernel.org/r/20220908185452.76590-1-jingyuwang_vip@163.com
Signed-off-by: Jingyu Wang <jingyuwang_vip@163.com>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ipc/mqueue.c
patch
|
blob
|
history
diff --git
a/ipc/mqueue.c
b/ipc/mqueue.c
index f98de32aeea174c440e084362bcca1c3edfe5e3c..9834104a5a31d2b7ff384fb1cea1b150ade02ac3 100644
(file)
--- a/
ipc/mqueue.c
+++ b/
ipc/mqueue.c
@@
-986,8
+986,7
@@
SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
out_unlock:
inode_unlock(d_inode(mnt->mnt_root));
- if (inode)
- iput(inode);
+ iput(inode);
mnt_drop_write(mnt);
out_name:
putname(name);