Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fatfs: remove redundant judgment

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

Link: https://lkml.kernel.org/r/1648265418-76563-1-git-send-email-fengyubo3@huawei.com
Signed-off-by: Yubo Feng <fengyubo3@huawei.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Yubo Feng and committed by
akpm
3fbb6b78 7374fa33

+2 -4
+2 -4
fs/fat/inode.c
··· 1889 1889 fat_msg(sb, KERN_INFO, "Can't find a valid FAT filesystem"); 1890 1890 1891 1891 out_fail: 1892 - if (fsinfo_inode) 1893 - iput(fsinfo_inode); 1894 - if (fat_inode) 1895 - iput(fat_inode); 1892 + iput(fsinfo_inode); 1893 + iput(fat_inode); 1896 1894 unload_nls(sbi->nls_io); 1897 1895 unload_nls(sbi->nls_disk); 1898 1896 fat_reset_iocharset(&sbi->options);