]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: correct server pointer dereferencing check to be more consistent
authorSteve French <stfrench@microsoft.com>
Thu, 23 Sep 2021 23:52:40 +0000 (18:52 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 24 Sep 2021 02:12:23 +0000 (21:12 -0500)
commit156034ed83ba7b6959911448426f3f0a0db7bd93
tree95e0dc39a0f34e4d25883ca6f7ffcb94e9e60f94
parentc9d0d82023b94a882dc295dd4fb3994905b5c4af
smb3: correct server pointer dereferencing check to be more consistent

Address warning:

    fs/smbfs_client/misc.c:273 header_assemble()
    warn: variable dereferenced before check 'treeCon->ses->server'

Pointed out by Dan Carpenter via smatch code analysis tool

Although the check is likely unneeded, adding it makes the code
more consistent and easier to read, as the same check is
done elsewhere in the function.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/misc.c