lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1648265418-76563-1-git-send-email-fengyubo3@huawei.com>
Date:   Sat, 26 Mar 2022 11:30:18 +0800
From:   fengyubo <fengyubo3@...wei.com>
To:     <hirofumi@...l.parknet.co.jp>
CC:     <linux-kernel@...r.kernel.org>, <fengyubo3@...wei.com>
Subject: [PATCH -next] fatfs: remove redundant judgment

From: Yubo Feng <fengyubo3@...wei.com>

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

Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Yubo Feng <fengyubo3@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ