fsl/fman: check dereferencing null pointer
authorFlorinel Iordache <florinel.iordache@nxp.com>
Mon, 3 Aug 2020 07:07:33 +0000 (10:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 09:02:04 +0000 (11:02 +0200)
commit53e0648caaf7daaf174cea12d2cfe95d8155a8fc
treed581955c8a459cdb5175c32a3c49f0b56e82e744
parentbe574082999ae68522e3e4efc3e9446b3df9de89
fsl/fman: check dereferencing null pointer

[ Upstream commit cc5d229a122106733a85c279d89d7703f21e4d4f ]

Add a safe check to avoid dereferencing null pointer

Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support")
Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/fman/fman_dtsec.c
drivers/net/ethernet/freescale/fman/fman_memac.c
drivers/net/ethernet/freescale/fman/fman_tgec.c