OSDN Git Service

fsl/fman: fix dereference null return value
authorFlorinel Iordache <florinel.iordache@nxp.com>
Mon, 3 Aug 2020 07:07:31 +0000 (10:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Aug 2020 23:20:14 +0000 (16:20 -0700)
commit0572054617f32670abab4b4e89a876954d54b704
treee95b08b48026b13f8d395a2fafb72bba5533f0e6
parent99f47abd9f7bf6e365820d355dc98f6955a562df
fsl/fman: fix dereference null return value

Check before using returned value to avoid dereferencing null pointer.

Fixes: 18a6c85fcc78 ("fsl/fman: Add FMan Port Support")
Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fman/fman_port.c