From 4974f9b7e0c90a751e9ec306701c49487e81625a Mon Sep 17 00:00:00 2001 From: Petr Štetiar Date: Mon, 6 May 2019 23:24:45 +0200 Subject: net: dsa: support of_get_mac_address new ERR_PTR error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was NVMEM support added to of_get_mac_address, so it could now return ERR_PTR encoded error values, so we need to adjust all current users of of_get_mac_address to this new fact. While at it, remove superfluous is_valid_ether_addr as the MAC address returned from of_get_mac_address is always valid and checked by is_valid_ether_addr anyway. Fixes: d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") Signed-off-by: Petr Štetiar Tested-by: Vladimir Oltean Signed-off-by: David S. Miller --- net/dsa/slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/dsa/slave.c') diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 316bce9e0fbf..fe7b6a62e8f1 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1418,7 +1418,7 @@ int dsa_slave_create(struct dsa_port *port) NETIF_F_HW_VLAN_CTAG_FILTER; slave_dev->hw_features |= NETIF_F_HW_TC; slave_dev->ethtool_ops = &dsa_slave_ethtool_ops; - if (port->mac && is_valid_ether_addr(port->mac)) + if (!IS_ERR_OR_NULL(port->mac)) ether_addr_copy(slave_dev->dev_addr, port->mac); else eth_hw_addr_inherit(slave_dev, master); -- cgit v1.2.3-59-g8ed1b