diff options
author | Danny Kukawka <danny.kukawka@bisect.de> | 2012-02-20 21:07:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-23 17:03:20 -0500 |
commit | 504f9b5a6bb5336ad434438d0cdd61a16db80129 (patch) | |
tree | 307356c1d47a8300fd4973159edaad130c5cda9f /drivers/net/ethernet/marvell/pxa168_eth.c | |
parent | 32d219ed61a97f6591a941e23673b2c1dd8628e7 (diff) |
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/marvell/pxa168_eth.c')
-rw-r--r-- | drivers/net/ethernet/marvell/pxa168_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index 83e37ad113e0..3a7df0593c68 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c | |||
@@ -627,7 +627,7 @@ static int pxa168_eth_set_mac_address(struct net_device *dev, void *addr) | |||
627 | unsigned char oldMac[ETH_ALEN]; | 627 | unsigned char oldMac[ETH_ALEN]; |
628 | 628 | ||
629 | if (!is_valid_ether_addr(sa->sa_data)) | 629 | if (!is_valid_ether_addr(sa->sa_data)) |
630 | return -EINVAL; | 630 | return -EADDRNOTAVAIL; |
631 | memcpy(oldMac, dev->dev_addr, ETH_ALEN); | 631 | memcpy(oldMac, dev->dev_addr, ETH_ALEN); |
632 | dev->addr_assign_type &= ~NET_ADDR_RANDOM; | 632 | dev->addr_assign_type &= ~NET_ADDR_RANDOM; |
633 | memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN); | 633 | memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN); |