Skip to content

Commit

Permalink
ipc: mqueue: remove unnecessary conditionals
Browse files Browse the repository at this point in the history
iput() already handles null and non-null parameters, so there is no need
to use if().

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Jingyu Wang <[email protected]>
Acked-by: Roman Gushchin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
lemon1989 authored and akpm00 committed Oct 3, 2022
1 parent 8f824b4 commit 5758478
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5758478

Please sign in to comment.