aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/mvpp2
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-06 18:06:58 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-07 13:39:51 +0100
commit8017c4d8173cfe086420dc5710d631cabd03ef67 (patch)
treec2bf02641bbbf8eef2b8bf3c2c494ecb9ffe57cf /drivers/net/ethernet/marvell/mvpp2
parentdevice property: move mac addr helpers to eth.c (diff)
downloadlinux-dev-8017c4d8173cfe086420dc5710d631cabd03ef67.tar.xz
linux-dev-8017c4d8173cfe086420dc5710d631cabd03ef67.zip
eth: fwnode: change the return type of mac address helpers
fwnode_get_mac_address() and device_get_mac_address() return a pointer to the buffer that was passed to them on success or NULL on failure. None of the callers care about the actual value, only if it's NULL or not. These semantics differ from of_get_mac_address() which returns an int so to avoid confusion make the device helpers return an errno. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvpp2')
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 3197526455d9..b84f8b6fe9f4 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -6081,7 +6081,7 @@ static void mvpp2_port_copy_mac_addr(struct net_device *dev, struct mvpp2 *priv,
char hw_mac_addr[ETH_ALEN] = {0};
char fw_mac_addr[ETH_ALEN];
- if (fwnode_get_mac_address(fwnode, fw_mac_addr, ETH_ALEN)) {
+ if (!fwnode_get_mac_address(fwnode, fw_mac_addr, ETH_ALEN)) {
*mac_from = "firmware node";
eth_hw_addr_set(dev, fw_mac_addr);
return;