summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2020-01-17 10:57:17 +0800
committerSteve French <stfrench@microsoft.com>2020-01-26 19:24:17 -0600
commitc4985c3d9902dcd66f0b61d048560ef2cc415542 (patch)
treefabe7d070ea4a53151c29b3af07e0c976aef3983 /fs
parent0a5a98863c9debc02387b3d23c46d187756f5e2b (diff)
cifs: remove set but not used variable 'server'
fs/cifs/smb2pdu.c: In function 'SMB2_query_directory': fs/cifs/smb2pdu.c:4444:26: warning: variable 'server' set but not used [-Wunused-but-set-variable] struct TCP_Server_Info *server; It is not used, so remove it. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/smb2pdu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index a23ca3d0dcd9..64d5a36a1901 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -4441,13 +4441,10 @@ SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon,
int resp_buftype = CIFS_NO_BUFFER;
struct kvec rsp_iov;
int rc = 0;
- struct TCP_Server_Info *server;
struct cifs_ses *ses = tcon->ses;
int flags = 0;
- if (ses && (ses->server))
- server = ses->server;
- else
+ if (!ses || !(ses->server))
return -EIO;
if (smb3_encryption_required(tcon))