[PATCH] afs: remove redundant overwriting of ret

Anastasia Belova abelova at astralinux.ru
Thu Dec 21 00:58:49 PST 2023


ret is the result of dns lookup. There are several
ways to handle different errors (described by switch).
So it is necessary to keep the return value of afs_dns_query.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: d5c32c89b208 ("afs: Fix cell DNS lookup")
Signed-off-by: Anastasia Belova <abelova at astralinux.ru>
---
 fs/afs/cell.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/afs/cell.c b/fs/afs/cell.c
index 988c2ac7cece..9a112e03bee1 100644
--- a/fs/afs/cell.c
+++ b/fs/afs/cell.c
@@ -409,7 +409,6 @@ static int afs_update_cell(struct afs_cell *cell)
 		if (ret == -ENOMEM)
 			goto out_wake;
 
-		ret = -ENOMEM;
 		vllist = afs_alloc_vlserver_list(0);
 		if (!vllist)
 			goto out_wake;
-- 
2.30.2




More information about the linux-afs mailing list