summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYubo Feng <fengyubo3@huawei.com>2022-04-29 14:38:02 -0700
committerakpm <akpm@linux-foundation.org>2022-04-29 14:38:02 -0700
commit3fbb6b784acb4f308e2bc93dbc57761e8b6d9e80 (patch)
tree3307cb1f9a65688b7de86e4005d0223abacf8b25
parent7374fa33dc2dd76b71999f8fd236e73b21161030 (diff)
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>
-rw-r--r--fs/fat/inode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index bf6051bdf1d1..cb698a827c9a 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);