Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e15b8215 authored by Sunil Paidimarri's avatar Sunil Paidimarri
Browse files

net : stmmac: Fix the MAC2MAC crash



Check phydev for null in case MAC2MAC enabled.

Change-Id: I728fc74ad680f4eca0e7eb8d83bfb38343ee7e26
Signed-off-by: default avatarSunil Paidimarri <hisunil@codeaurora.org>
parent 09b17074
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -296,6 +296,12 @@ static inline u32 stmmac_rx_dirty(struct stmmac_priv *priv, u32 queue)
static inline void stmmac_hw_fix_mac_speed(struct stmmac_priv *priv)
static inline void stmmac_hw_fix_mac_speed(struct stmmac_priv *priv)
{
{
	if (likely(priv->plat->fix_mac_speed)) {
	if (likely(priv->plat->fix_mac_speed)) {
		if (priv->plat->mac2mac_en) {
			priv->plat->fix_mac_speed(priv->plat->bsp_priv,
					priv->speed);
			return;
		}

		if (priv->phydev->link)
		if (priv->phydev->link)
			priv->plat->fix_mac_speed(priv->plat->bsp_priv,
			priv->plat->fix_mac_speed(priv->plat->bsp_priv,
						  priv->speed);
						  priv->speed);