eth_hw_addr_random(dev);
dev_err(eth->dev, "generated random MAC address %pM\n",
dev->dev_addr);
+--- a/drivers/net/ethernet/micrel/ks8851.c
++++ b/drivers/net/ethernet/micrel/ks8851.c
+@@ -419,11 +419,10 @@ static void ks8851_read_mac_addr(struct
+ static void ks8851_init_mac(struct ks8851_net *ks)
+ {
+ struct net_device *dev = ks->netdev;
+- const u8 *mac_addr;
++ int ret;
+
+- mac_addr = of_get_mac_address(ks->spidev->dev.of_node);
+- if (!IS_ERR(mac_addr)) {
+- ether_addr_copy(dev->dev_addr, mac_addr);
++ ret = of_get_mac_address(ks->spidev->dev.of_node, dev->dev_addr);
++ if (!ret) {
+ ks8851_write_mac_addr(dev);
+ return;
+ }
+--- a/drivers/net/ethernet/micrel/ks8851_mll.c
++++ b/drivers/net/ethernet/micrel/ks8851_mll.c
+@@ -1239,7 +1239,6 @@ static int ks8851_probe(struct platform_
+ struct net_device *netdev;
+ struct ks_net *ks;
+ u16 id, data;
+- const char *mac;
+
+ netdev = alloc_etherdev(sizeof(struct ks_net));
+ if (!netdev)
+@@ -1326,9 +1325,7 @@ static int ks8851_probe(struct platform_
+
+ /* overwriting the default MAC address */
+ if (pdev->dev.of_node) {
+- mac = of_get_mac_address(pdev->dev.of_node);
+- if (!IS_ERR(mac))
+- ether_addr_copy(ks->mac_addr, mac);
++ of_get_mac_address(pdev->dev.of_node, ks->mac_addr);
+ } else {
+ struct ks8851_mll_platform_data *pdata;
+
--- a/drivers/net/ethernet/nxp/lpc_eth.c
+++ b/drivers/net/ethernet/nxp/lpc_eth.c
-@@ -1350,9 +1350,7 @@ static int lpc_eth_drv_probe(struct plat
+@@ -1349,9 +1349,7 @@ static int lpc_eth_drv_probe(struct plat
__lpc_get_mac(pldat, ndev->dev_addr);
if (!is_valid_ether_addr(ndev->dev_addr)) {
"no valid MAC address supplied, using a random one\n");
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -3194,7 +3194,6 @@ static struct sh_eth_plat_data *sh_eth_p
+@@ -3195,7 +3195,6 @@ static struct sh_eth_plat_data *sh_eth_p
{
struct device_node *np = dev->of_node;
struct sh_eth_plat_data *pdata;
int ret;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
-@@ -3206,9 +3205,7 @@ static struct sh_eth_plat_data *sh_eth_p
+@@ -3207,9 +3206,7 @@ static struct sh_eth_plat_data *sh_eth_p
return NULL;
pdata->phy_interface = ret;
int irq;
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -4469,7 +4469,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -4471,7 +4471,7 @@ int stmmac_dvr_probe(struct device *devi
priv->wol_irq = res->wol_irq;
priv->lpi_irq = res->lpi_irq;
}
plat->phy_interface = of_get_phy_mode(np);
-@@ -631,7 +631,7 @@ void stmmac_remove_config_dt(struct plat
+@@ -639,7 +639,7 @@ void stmmac_remove_config_dt(struct plat
}
#else
struct plat_stmmacenet_data *
if (ret)
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
-@@ -1685,7 +1685,6 @@ davinci_emac_of_get_pdata(struct platfor
+@@ -1697,7 +1697,6 @@ davinci_emac_of_get_pdata(struct platfor
const struct of_device_id *match;
const struct emac_platform_data *auxdata;
struct emac_platform_data *pdata = NULL;
if (!IS_ENABLED(CONFIG_OF) || !pdev->dev.of_node)
return dev_get_platdata(&pdev->dev);
-@@ -1697,11 +1696,8 @@ davinci_emac_of_get_pdata(struct platfor
+@@ -1709,11 +1708,8 @@ davinci_emac_of_get_pdata(struct platfor
np = pdev->dev.of_node;
pdata->version = EMAC_VERSION_2;
of_id = of_match_device(w5100_of_match, &spi->dev);
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
-@@ -1157,7 +1157,7 @@ int w5100_probe(struct device *dev, cons
+@@ -1159,7 +1159,7 @@ int w5100_probe(struct device *dev, cons
INIT_WORK(&priv->setrx_work, w5100_setrx_work);
INIT_WORK(&priv->restart_work, w5100_restart_work);
if (!is_valid_ether_addr(ndev->dev_addr))
eth_hw_addr_random(ndev);
temac_do_set_mac_address(ndev);
-@@ -1298,7 +1298,7 @@ static int temac_probe(struct platform_d
+@@ -1296,7 +1296,7 @@ static int temac_probe(struct platform_d
struct temac_local *lp;
struct net_device *ndev;
struct resource *res;
__be32 *p;
bool little_endian;
int rc = 0;
-@@ -1494,8 +1494,8 @@ static int temac_probe(struct platform_d
+@@ -1492,8 +1492,8 @@ static int temac_probe(struct platform_d
if (temac_np) {
/* Retrieve the MAC address */
break;
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
-@@ -1416,7 +1416,7 @@ int dsa_slave_create(struct dsa_port *po
+@@ -1414,7 +1414,7 @@ int dsa_slave_create(struct dsa_port *po
slave_dev->hw_features |= NETIF_F_HW_TC;
slave_dev->features |= NETIF_F_LLTX;
slave_dev->ethtool_ops = &dsa_slave_ethtool_ops;