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: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
                                } else {
                                        ctrl &= ~priv->mac_type->hw.link.port;
                                }
-                               priv->fix_mac_speed(priv->bsp_priv,
-                                                   phydev->speed);
+                               if (likely(priv->fix_mac_speed))
+                                       priv->fix_mac_speed(priv->bsp_priv,
+                                                           phydev->speed);
                                break;
                        default:
                                if (netif_msg_link(priv))