diff options
Diffstat (limited to 'target/linux/ramips/files')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index cf6d4806ed..e07e5ed5a8 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -1368,7 +1368,6 @@ static int __init fe_init(struct net_device *dev) { struct fe_priv *priv = netdev_priv(dev); struct device_node *port; - const char *mac_addr; int err; if (priv->soc->reset_fe) @@ -1389,9 +1388,7 @@ static int __init fe_init(struct net_device *dev) fe_reset_phy(priv); - mac_addr = of_get_mac_address(priv->dev->of_node); - if (!IS_ERR_OR_NULL(mac_addr)) - ether_addr_copy(dev->dev_addr, mac_addr); + of_get_mac_address(priv->dev->of_node, dev->dev_addr); /* If the mac address is invalid, use random mac address */ if (!is_valid_ether_addr(dev->dev_addr)) { |