lkml.org 
[lkml]   [2021]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH linux] nfs: Remove unnecessary ret assignment
Date
From: luo penghao <luo.penghao@zte.com.cn>

Subsequent if judgments will assign new values to ret, so the
statement here should be deleted

The clang_analyzer complains as follows:

fs/nfs/callback.c:

Value stored to 'ret' is never read

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
fs/nfs/callback.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 86d856d..1c1c82a 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -209,7 +209,6 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
goto err_bind;
}

- ret = 0;
if (!IS_ENABLED(CONFIG_NFS_V4_1) || minorversion == 0)
ret = nfs4_callback_up_net(serv, net);
else if (xprt->ops->bc_setup)
--
2.15.2

\
 
 \ /
  Last update: 2021-12-30 07:35    [W:0.042 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site