]> www.infradead.org Git - users/hch/misc.git/commitdiff
smb: client: Omit an if branch in smb2_find_smb_tcon()
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 9 Oct 2025 15:00:13 +0000 (17:00 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 9 Oct 2025 15:40:43 +0000 (10:40 -0500)
Statements from an if branch and the end of this function implementation
were equivalent.
Thus delete duplicate source code.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2transport.c

index bc0e92eb2b64ae6e4fd2af87ed1a7f056876b19d..33f33013b392737fed6d591c04fdad15cf538e9e 100644 (file)
@@ -240,11 +240,6 @@ smb2_find_smb_tcon(struct TCP_Server_Info *server, __u64 ses_id, __u32  tid)
                return NULL;
        }
        tcon = smb2_find_smb_sess_tcon_unlocked(ses, tid);
-       if (!tcon) {
-               spin_unlock(&cifs_tcp_ses_lock);
-               cifs_put_smb_ses(ses);
-               return NULL;
-       }
        spin_unlock(&cifs_tcp_ses_lock);
        /* tcon already has a ref to ses, so we don't need ses anymore */
        cifs_put_smb_ses(ses);