diff options
author | Steve French <stfrench@microsoft.com> | 2021-07-26 16:22:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-12 13:22:20 +0200 |
commit | c8b7cfa674ee18dcef601427c07aad987e4195a3 (patch) | |
tree | 25937775ea6bb827463fc874a2983c3ba4de7dbc | |
parent | 8cfdd039ca186adc332170818940f287d29c921c (diff) | |
download | linux-stable-c8b7cfa674ee18dcef601427c07aad987e4195a3.tar.gz linux-stable-c8b7cfa674ee18dcef601427c07aad987e4195a3.tar.bz2 linux-stable-c8b7cfa674ee18dcef601427c07aad987e4195a3.zip |
smb3: rc uninitialized in one fallocate path
[ Upstream commit 5ad4df56cd2158965f73416d41fce37906724822 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | fs/cifs/smb2ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 81e087723777..fdb1d660bd13 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -3466,7 +3466,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; |