diff options
author | Jingyu Wang <jingyuwang_vip@163.com> | 2022-09-09 02:54:52 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-03 14:21:42 -0700 |
commit | 5758478a3d3c42a78ee9ddc4b08db3e968a68058 (patch) | |
tree | 4a739860546e85f4175cbea4c500fe2f3981e284 /ipc | |
parent | 8f824b4abd31c5ea32ae1d6725c47bdb247d18da (diff) | |
download | linux-rpi-5758478a3d3c42a78ee9ddc4b08db3e968a68058.tar.gz linux-rpi-5758478a3d3c42a78ee9ddc4b08db3e968a68058.tar.bz2 linux-rpi-5758478a3d3c42a78ee9ddc4b08db3e968a68058.zip |
ipc: mqueue: remove unnecessary conditionals
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>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/mqueue.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index f98de32aeea1..9834104a5a31 100644 --- 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); |