summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorMadalin Bucur <madalin.bucur@nxp.com>2016-06-28 15:32:44 +0300
committerMadalin Bucur <madalin.bucur@nxp.com>2016-10-04 09:26:08 +0300
commit47256192c65b786ea9dbebf47f45b938a02e3914 (patch)
treefe03cd0f516158cb4aea6668221c2aa977fda4e1 /drivers/net/ethernet/freescale
parent44045e45abbda3e6db7ca0ef3e460e6ed03419c9 (diff)
fsl/fman: check pcsphy pointer before use
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/fman/fman_memac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c
index 96dfe7eb4e5f..53ef51e3bd9e 100644
--- a/drivers/net/ethernet/freescale/fman/fman_memac.c
+++ b/drivers/net/ethernet/freescale/fman/fman_memac.c
@@ -507,6 +507,9 @@ static void setup_sgmii_internal_phy(struct fman_mac *memac,
{
u16 tmp_reg16;
+ if (WARN_ON(!memac->pcsphy))
+ return;
+
/* SGMII mode */
tmp_reg16 = IF_MODE_SGMII_EN;
if (!fixed_link)