]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita4bde95ec45d81767f238766ce0259b67e38777a
treec5f0f3246cd197da8518934fdf4ac47a055113e1
parent9e3204bf082cffb923925bc4152575b0d849d708
smb3: check for null tcon

[ Upstream commit 52e26eb6ade0721a1e6b103c037d78a810e9d09e ]

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