mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
fb33c6510d
commit
39946886fc
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue