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-Tag: Ubuntu-5.13.0-19.19~8606^2~20^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=284eb160681ce4f736dd05c83970a407a230ec6f;p=mirror_ubuntu-jammy-kernel.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);