aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2021-07-26 16:22:55 -0500
committerSteve French <stfrench@microsoft.com>2021-07-26 22:35:46 -0500
commit5ad4df56cd2158965f73416d41fce37906724822 (patch)
tree9a3cd1fbd11d25c82e4b2a23cdf1825fd7e2de5c /fs/cifs
parentSMB3: fix readpage for large swap cache (diff)
downloadlinux-dev-5ad4df56cd2158965f73416d41fce37906724822.tar.xz
linux-dev-5ad4df56cd2158965f73416d41fce37906724822.zip
smb3: rc uninitialized in one fallocate path
Clang detected a problem with rc possibly being unitialized (when length is zero) in a recently added fallocate code path. Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 23d6f4d71649..2dfd0d8297eb 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -3617,7 +3617,8 @@ static int smb3_simple_fallocate_write_range(unsigned int xid,
char *buf)
{
struct cifs_io_parms io_parms = {0};
- int rc, nbytes;
+ int nbytes;
+ int rc = 0;
struct kvec iov[2];
io_parms.netfid = cfile->fid.netfid;