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]>
Signed-off-by: Steve French <[email protected]>
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;
--
Thanks,
Steve
Steve French <[email protected]> writes:
> 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]>
> Signed-off-by: Steve French <[email protected]>
>
> 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
Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>