Skip to content

Commit

Permalink
smb3: rc uninitialized in one fallocate path
Browse files Browse the repository at this point in the history
[ Upstream commit 5ad4df5 ]

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>
  • Loading branch information
Steve French authored and gregkh committed Aug 12, 2021
1 parent 8cfdd03 commit c8b7cfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/smb2ops.c
Expand Up @@ -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;
Expand Down

0 comments on commit c8b7cfa

Please sign in to comment.