diff options
author | Yubo Feng <[email protected]> | 2022-04-29 14:38:02 -0700 |
---|---|---|
committer | akpm <[email protected]> | 2022-04-29 14:38:02 -0700 |
commit | 3fbb6b784acb4f308e2bc93dbc57761e8b6d9e80 (patch) | |
tree | 3307cb1f9a65688b7de86e4005d0223abacf8b25 | |
parent | 7374fa33dc2dd76b71999f8fd236e73b21161030 (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/[email protected]
Signed-off-by: Yubo Feng <[email protected]>
Reported-by: Hulk Robot <[email protected]>
Acked-by: OGAWA Hirofumi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | fs/fat/inode.c | 6 |
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); |