projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7374fa3
)
fatfs: remove redundant judgment
author
Yubo Feng
<fengyubo3@huawei.com>
Fri, 29 Apr 2022 21:38:02 +0000
(14:38 -0700)
committer
akpm
<akpm@linux-foundation.org>
Fri, 29 Apr 2022 21:38:02 +0000
(14:38 -0700)
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>
fs/fat/inode.c
patch
|
blob
|
history
diff --git
a/fs/fat/inode.c
b/fs/fat/inode.c
index bf6051bdf1d1d98ccc0ce64dd720734080f28a94..cb698a827c9a095ad168c9324689be92a034d046 100644
(file)
--- 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);