Skip to content

Commit c8b7cfa

Browse files
smfrenchgregkh
authored andcommitted
smb3: rc uninitialized in one fallocate path
[ 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 <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 8cfdd03 commit c8b7cfa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/cifs/smb2ops.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3466,7 +3466,8 @@ static int smb3_simple_fallocate_write_range(unsigned int xid,
34663466
char *buf)
34673467
{
34683468
struct cifs_io_parms io_parms = {0};
3469-
int rc, nbytes;
3469+
int nbytes;
3470+
int rc = 0;
34703471
struct kvec iov[2];
34713472

34723473
io_parms.netfid = cfile->fid.netfid;

0 commit comments

Comments
 (0)