From: Jingyu Wang <jingyuwang_vip@163.com>
To: akpm@linux-foundation.org, ebiederm@xmission.com,
roman.gushchin@linux.dev, hbh25y@gmail.com, legion@kernel.org,
longman@redhat.com, songmuchun@bytedance.com
Cc: linux-kernel@vger.kernel.org, Jingyu Wang <jingyuwang_vip@163.com>
Subject: [PATCH] ipc: mqueue: remove unnecessary conditionals
Date: Fri, 9 Sep 2022 02:54:52 +0800 [thread overview]
Message-ID: <20220908185452.76590-1-jingyuwang_vip@163.com> (raw)
iput() has already handled null and non-null parameter, so it is no
need to use if().
Signed-off-by: Jingyu Wang <jingyuwang_vip@163.com>
---
ipc/mqueue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 9cf314b3f079..467a194b8a2e 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);
base-commit: 5957ac6635a1a12d4aa2661bbf04d3085a73372a
--
2.34.1
next reply other threads:[~2022-09-08 18:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 18:54 Jingyu Wang [this message]
2022-09-08 20:04 ` Roman Gushchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220908185452.76590-1-jingyuwang_vip@163.com \
--to=jingyuwang_vip@163.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=hbh25y@gmail.com \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=roman.gushchin@linux.dev \
--cc=songmuchun@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®