diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index c156f42c37b9..9cf20f1c295a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -998,7 +998,7 @@ static void stmmac_mac_link_up(struct phylink_config *config, stmmac_set_eee_pls(priv, priv->hw, true); } #ifdef CONFIG_MSM_BOOT_TIME_MARKER - if (phy->link == 1 && !priv->boot_kpi) { + if ((phy && phy->link == 1) && !priv->boot_kpi) { place_marker("M - Ethernet is Ready.Link is UP"); priv->boot_kpi = true; }