Skip to content

Commit

Permalink
staging: octeon-ethernet: support of_get_mac_address new ERR_PTR error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Petr Štetiar authored and David S. Miller committed May 6, 2019
1 parent d31a36b commit 284eb16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/octeon/ethernet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 284eb16

Please sign in to comment.