diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-02-28 10:22:59 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-03-17 19:26:26 +0100 |
commit | 39946886fc865a4c26f1b3ea0805936db2d8986d (patch) | |
tree | f668cd4abd909f616b731eb6553a1524714ba432 /fs/cifs/inode.c | |
parent | Linux 5.6-rc6 (diff) | |
download | linux-39946886fc865a4c26f1b3ea0805936db2d8986d.tar.xz linux-39946886fc865a4c26f1b3ea0805936db2d8986d.zip |
cifs: potential unintitliazed error code in cifs_getattr()
Smatch complains that "rc" could be uninitialized.
fs/cifs/inode.c:2206 cifs_getattr() error: uninitialized symbol 'rc'.
Changing it to "return 0;" improves readability as well.
Fixes: cc1baf98c8f6 ("cifs: do not ignore the SYNC flags in getattr")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/cifs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 1e8a4b1579db..b16f8d23e97b 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -2191,7 +2191,7 @@ int cifs_getattr(const struct path *path, struct kstat *stat, if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID)) stat->gid = current_fsgid(); } - return rc; + return 0; } int cifs_fiemap(struct inode *inode, struct fiemap_extent_info *fei, u64 start, |