From: Yubo Feng Date: Fri, 29 Apr 2022 21:38:02 +0000 (-0700) Subject: fatfs: remove redundant judgment X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3fbb6b784acb4f308e2bc93dbc57761e8b6d9e80;p=linux.git 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 Reported-by: Hulk Robot Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton --- diff --git a/fs/fat/inode.c b/fs/fat/inode.c index bf6051bdf1d1d..cb698a827c9a0 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1889,10 +1889,8 @@ out_invalid: 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);