mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: fengyubo <fengyubo3@huawei.com>
To: <hirofumi@mail.parknet.co.jp>
Cc: <linux-kernel@vger.kernel.org>, <fengyubo3@huawei.com>
Subject: [PATCH -next] fatfs: remove redundant judgment
Date: Sat, 26 Mar 2022 11:30:18 +0800	[thread overview]
Message-ID: <1648265418-76563-1-git-send-email-fengyubo3@huawei.com> (raw)

From: Yubo Feng <fengyubo3@huawei.com>

iput() has already judged the incoming parameter, so there is no need to
repeat outside.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yubo Feng <fengyubo3@huawei.com>
---
 fs/fat/inode.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index a6f1c6d426d1..da8619148590 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1888,10 +1888,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 		fat_msg(sb, KERN_INFO, "Can't find a valid FAT filesystem");
 
 out_fail:
-	if (fsinfo_inode)
-		iput(fsinfo_inode);
-	if (fat_inode)
-		iput(fat_inode);
+	iput(fsinfo_inode);
+	iput(fat_inode);
 	unload_nls(sbi->nls_io);
 	unload_nls(sbi->nls_disk);
 	fat_reset_iocharset(&sbi->options);
-- 
2.17.1


             reply	other threads:[~2022-03-26  3:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-26  3:30 fengyubo [this message]
2022-03-26  4:47 ` OGAWA Hirofumi

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=1648265418-76563-1-git-send-email-fengyubo3@huawei.com \
    --to=fengyubo3@huawei.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /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®