From: Petr Štetiar Date: Fri, 3 May 2019 14:27:13 +0000 (+0200) Subject: staging: octeon-ethernet: support of_get_mac_address new ERR_PTR error X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=284eb160681ce4f736dd05c83970a407a230ec6f;p=openwrt%2Fstaging%2Fblogic.git staging: octeon-ethernet: support of_get_mac_address new ERR_PTR error 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. Signed-off-by: Petr Štetiar Signed-off-by: David S. Miller --- diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 986db76705cc..2b0301821d7b 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -421,7 +421,7 @@ int cvm_oct_common_init(struct net_device *dev) if (priv->of_node) mac = of_get_mac_address(priv->of_node); - if (mac) + if (!IS_ERR(mac)) ether_addr_copy(dev->dev_addr, mac); else eth_hw_addr_random(dev);