Skip to content

Commit

Permalink
fsl/fman: check pcsphy pointer before use
Browse files Browse the repository at this point in the history
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
  • Loading branch information
Madalin Bucur committed Oct 4, 2016
1 parent 44045e4 commit 4725619
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/freescale/fman/fman_memac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4725619

Please sign in to comment.