summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aeroflex
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-02-21 03:07:49 +0100
committerDavid S. Miller <davem@davemloft.net>2012-02-23 23:03:20 +0100
commit504f9b5a6bb5336ad434438d0cdd61a16db80129 (patch)
tree307356c1d47a8300fd4973159edaad130c5cda9f /drivers/net/ethernet/aeroflex
parentMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh... (diff)
downloadlinux-504f9b5a6bb5336ad434438d0cdd61a16db80129.tar.xz
linux-504f9b5a6bb5336ad434438d0cdd61a16db80129.zip
ethernet: unify return value of .ndo_set_mac_address if address is invalid
Unify return value of .ndo_set_mac_address if the given address isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does if is_valid_ether_addr() fails. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aeroflex')
-rw-r--r--drivers/net/ethernet/aeroflex/greth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index cfa13481e5f2..348501178089 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1017,7 +1017,7 @@ static int greth_set_mac_add(struct net_device *dev, void *p)
regs = (struct greth_regs *) greth->regs;
if (!is_valid_ether_addr(addr->sa_data))
- return -EINVAL;
+ return -EADDRNOTAVAIL;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
GRETH_REGSAVE(regs->esa_msb, dev->dev_addr[0] << 8 | dev->dev_addr[1]);