summaryrefslogtreecommitdiffstats
path: root/fs/ntfs3/index.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2021-09-18 21:56:19 +0200
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2021-09-23 19:05:25 +0300
commitd2846bf33c1423ff872c7a7c2afde292ad502c04 (patch)
tree06670dcce984b067ab28f08f45c2a5b36e4887b6 /fs/ntfs3/index.c
parent6354467245ff8dd04b54e39790f2ee4d21d5419e (diff)
downloadlinux-stable-d2846bf33c1423ff872c7a7c2afde292ad502c04.tar.gz
linux-stable-d2846bf33c1423ff872c7a7c2afde292ad502c04.tar.bz2
linux-stable-d2846bf33c1423ff872c7a7c2afde292ad502c04.zip
fs/ntfs3: Remove a useless test in 'indx_find()'
'fnd' has been dereferenced several time before, so testing it here is pointless. Moreover, all callers of 'indx_find()' already have some error handling code that makes sure that no NULL 'fnd' is passed. So, remove the useless test. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Kari Argillander <kari.argillander@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/index.c')
-rw-r--r--fs/ntfs3/index.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 4f71a91f07d9..6f81e3a49abf 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1072,9 +1072,7 @@ int indx_find(struct ntfs_index *indx, struct ntfs_inode *ni,
if (!e)
return -EINVAL;
- if (fnd)
- fnd->root_de = e;
-
+ fnd->root_de = e;
err = 0;
for (;;) {