smb3: check for null tcon
authorSteve French <stfrench@microsoft.com>
Tue, 24 May 2022 01:42:03 +0000 (20:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:43 +0000 (10:22 +0200)
commit9e5b03ca021430edeed4077c1865a903c4073b26
treec5f0f3246cd197da8518934fdf4ac47a055113e1
parentdf6d8b689252c0acc0448d4ae3d33f2d6db048ab
smb3: check for null tcon

[ Upstream commit bbdf6cf56c88845fb0b713cbf5c6623c53fe40d8 ]

Although unlikely to be null, it is confusing to use a pointer
before checking for it to be null so move the use down after
null check.

Addresses-Coverity: 1517586 ("Null pointer dereferences  (REVERSE_INULL)")
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/smb2ops.c