fore200e: Fix incorrect checks of NULL pointer dereference
authorAditya Pakki <pakki001@umn.edu>
Sun, 15 Dec 2019 16:14:51 +0000 (10:14 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:34:42 +0000 (08:34 +0100)
commit8a3bc6e31b2b40f5c8f20ba355c34203ea21abd0
treeb1f0f2b5bdd0865d2ea73b73b25bbe7e80781aa0
parent85a19b0e31e256e77fd4124804b9cec10619de5e
fore200e: Fix incorrect checks of NULL pointer dereference

[ Upstream commit bbd20c939c8aa3f27fa30e86691af250bf92973a ]

In fore200e_send and fore200e_close, the pointers from the arguments
are dereferenced in the variable declaration block and then checked
for NULL. The patch fixes these issues by avoiding NULL pointer
dereferences.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/atm/fore200e.c