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

Commit 65818fa7 authored by Giuseppe CAVALLARO's avatar Giuseppe CAVALLARO Committed by David S. Miller
Browse files

stmmac: do not call fix_mac_speed if NULL



On some platforms, fix_mac_speed is used for
configuring some sysconf registers according
to the working speed.
This patch fixes the fix_mac_speed invocation
that cannot be done if it is a NULL pointer.

Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca5f12c1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ static void stmmac_adjust_link(struct net_device *dev)
				} else {
					ctrl &= ~priv->mac_type->hw.link.port;
				}
				if (likely(priv->fix_mac_speed))
					priv->fix_mac_speed(priv->bsp_priv,
							    phydev->speed);
				break;