diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-06 18:06:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-07 13:39:51 +0100 |
commit | 8017c4d8173cfe086420dc5710d631cabd03ef67 (patch) | |
tree | c2bf02641bbbf8eef2b8bf3c2c494ecb9ffe57cf /drivers/net/ethernet/broadcom/genet/bcmgenet.c | |
parent | 433baf0719d6a81d0587ea27545a120a3880abf6 (diff) | |
download | lwn-8017c4d8173cfe086420dc5710d631cabd03ef67.tar.gz lwn-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/broadcom/genet/bcmgenet.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 02fe98cbabb0..30c5dcaea802 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -4084,7 +4084,7 @@ static int bcmgenet_probe(struct platform_device *pdev) if (pd && !IS_ERR_OR_NULL(pd->mac_address)) eth_hw_addr_set(dev, pd->mac_address); else - if (!device_get_mac_address(&pdev->dev, dev->dev_addr, ETH_ALEN)) + if (device_get_mac_address(&pdev->dev, dev->dev_addr, ETH_ALEN)) if (has_acpi_companion(&pdev->dev)) bcmgenet_get_hw_addr(priv, dev->dev_addr); |