From: Christophe JAILLET Date: Sat, 18 Sep 2021 19:56:19 +0000 (+0200) Subject: fs/ntfs3: Remove a useless test in 'indx_find()' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d2846bf33c1423ff872c7a7c2afde292ad502c04;p=linux.git 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 Reviewed-by: Kari Argillander Signed-off-by: Konstantin Komarov --- diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c index 4f71a91f07d9f..6f81e3a49abfb 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 (;;) {