]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
fs/ntfs3: Remove a useless test in 'indx_find()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 18 Sep 2021 19:56:19 +0000 (21:56 +0200)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Thu, 23 Sep 2021 16:05:25 +0000 (19:05 +0300)
'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>
fs/ntfs3/index.c

index 4f71a91f07d9fc56efe6a80ebf52995e2e9a65de..6f81e3a49abfb30f7aa570e26cf595b3e8599032 100644 (file)
@@ -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 (;;) {