fsl/fman: check pcsphy pointer before use

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
This commit is contained in:
Madalin Bucur 2016-06-28 15:32:44 +03:00
parent 44045e45ab
commit 47256192c6

View File

@ -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)