summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2014-04-04 00:05:21 +0200
committerSteve French <smfrench@gmail.com>2014-04-16 13:51:46 -0500
commit8e3ecc87695f4a7e9e217ebd55ca6a39b6a451b8 (patch)
treede09ad3494f0f58168b8327feee6c97b38a4b6ab /fs/cifs
parent60977fcc808664f82412bb37da7be17640ba99d9 (diff)
downloadop-kernel-dev-8e3ecc87695f4a7e9e217ebd55ca6a39b6a451b8.zip
op-kernel-dev-8e3ecc87695f4a7e9e217ebd55ca6a39b6a451b8.tar.gz
fs: cifs: remove unused variable.
In SMB2_set_compression(), the "res_key" variable is only initialized to NULL and later kfreed. It is therefore useless and should be removed. Found with the following semantic patch: <smpl> @@ identifier foo; identifier f; type T; @@ * f(...) { ... * T *foo = NULL; ... when forall when != foo * kfree(foo); ... } </smpl> Signed-off-by: Cyril Roelandt <tipecaml@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2pdu.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 8603447..3802f8c 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1352,7 +1352,6 @@ SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid)
{
int rc;
- char *res_key = NULL;
struct compress_ioctl fsctl_input;
char *ret_data = NULL;
@@ -1365,7 +1364,6 @@ SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
2 /* in data len */, &ret_data /* out data */, NULL);
cifs_dbg(FYI, "set compression rc %d\n", rc);
- kfree(res_key);
return rc;
}
OpenPOWER on IntegriCloud