summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon/ethernet.c
diff options
context:
space:
mode:
authorPetr Štetiar2019-05-03 16:27:13 +0200
committerDavid S. Miller2019-05-06 06:47:07 +0200
commit284eb160681ce4f736dd05c83970a407a230ec6f (patch)
treee6e63ab2beefbee6acf47dcd08c726dba3a3f01e /drivers/staging/octeon/ethernet.c
parentnet: wireless: support of_get_mac_address new ERR_PTR error (diff)
downloadkernel-qcow2-linux-284eb160681ce4f736dd05c83970a407a230ec6f.tar.gz
kernel-qcow2-linux-284eb160681ce4f736dd05c83970a407a230ec6f.tar.xz
kernel-qcow2-linux-284eb160681ce4f736dd05c83970a407a230ec6f.zip
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/ethernet.c')
-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);