ramips: fixes ethernet driver build error

Fixes: #9153
This commit is contained in:
AmadeusGhost 2022-03-24 23:10:20 +08:00
parent 065be5b18a
commit 2297f089da

View File

@ -1402,9 +1402,7 @@ static int __init fe_init(struct net_device *dev)
fe_reset_phy(priv); fe_reset_phy(priv);
mac_addr = of_get_mac_address(priv->dev->of_node); of_get_mac_address(priv->dev->of_node, dev->dev_addr);
if (!IS_ERR_OR_NULL(mac_addr))
ether_addr_copy(dev->dev_addr, mac_addr);
/* If the mac address is invalid, use random mac address */ /* If the mac address is invalid, use random mac address */
if (!is_valid_ether_addr(dev->dev_addr)) { if (!is_valid_ether_addr(dev->dev_addr)) {