Skip to content

Commit 5ad4df5

Browse files
committed
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 <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent f2a26a3 commit 5ad4df5

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
@@ -3617,7 +3617,8 @@ static int smb3_simple_fallocate_write_range(unsigned int xid,
36173617
char *buf)
36183618
{
36193619
struct cifs_io_parms io_parms = {0};
3620-
int rc, nbytes;
3620+
int nbytes;
3621+
int rc = 0;
36213622
struct kvec iov[2];
36223623

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

0 commit comments

Comments
 (0)