summaryrefslogtreecommitdiff
path: root/drivers/staging/octeon
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-05-03 16:27:13 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-05 21:47:07 -0700
commit284eb160681ce4f736dd05c83970a407a230ec6f (patch)
treee6e63ab2beefbee6acf47dcd08c726dba3a3f01e /drivers/staging/octeon
parentd31a36b5f407d796d121af745730712337cd32a1 (diff)
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 <ynezz@true.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/staging/octeon')
-rw-r--r--drivers/staging/octeon/ethernet.c2
1 files changed, 1 insertions, 1 deletions
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);