All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()'
@ 2021-09-18 19:56 Christophe JAILLET
  2021-09-18 19:56 ` [PATCH 2/2] fs/ntfs3: Remove a useless shadowing variable Christophe JAILLET
  2021-09-21 21:39 ` [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()' Kari Argillander
  0 siblings, 2 replies; 5+ messages in thread
From: Christophe JAILLET @ 2021-09-18 19:56 UTC (permalink / raw)
  To: almaz.alexandrovich; +Cc: ntfs3, kernel-janitors, Christophe JAILLET

'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>
---
 fs/ntfs3/index.c | 4 +---
 1 file changed, 1 insertion(+), 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 (;;) {
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-23 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18 19:56 [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()' Christophe JAILLET
2021-09-18 19:56 ` [PATCH 2/2] fs/ntfs3: Remove a useless shadowing variable Christophe JAILLET
2021-09-21 21:41   ` Kari Argillander
2021-09-21 21:39 ` [PATCH 1/2] fs/ntfs3: Remove a useless test in 'indx_find()' Kari Argillander
2021-09-23 16:11   ` Konstantin Komarov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.