Skip to content

Commit 9ccfc23

Browse files
committed
smb3: don't set rc when used and unneeded in query_info_compound
rc is not checked so should not be set coming back from open_cached_dir (the cfid pointer is checked instead to see if open_cached_dir failed) Addresses-Coverity: 1518021 ("Code maintainability issues (UNUSED_VALUE)") Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent bbdf6cf commit 9ccfc23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/cifs/smb2ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2700,7 +2700,7 @@ smb2_query_info_compound(const unsigned int xid, struct cifs_tcon *tcon,
27002700
memset(rsp_iov, 0, sizeof(rsp_iov));
27012701

27022702
if (!strcmp(path, ""))
2703-
rc = open_cached_dir(xid, tcon, path, cifs_sb, &cfid);
2703+
open_cached_dir(xid, tcon, path, cifs_sb, &cfid); /* cfid null if open dir failed */
27042704

27052705
memset(&open_iov, 0, sizeof(open_iov));
27062706
rqst[0].rq_iov = open_iov;

0 commit comments

Comments
 (0)