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>
This commit is contained in:
Danny Kukawka
2012-02-21 02:07:49 +00:00
committed by David S. Miller
parent 32d219ed61
commit 504f9b5a6b
18 changed files with 18 additions and 18 deletions

View File

@@ -1148,7 +1148,7 @@ static int tsi108_set_mac(struct net_device *dev, void *addr)
int i;
if (!is_valid_ether_addr(addr))
return -EINVAL;
return -EADDRNOTAVAIL;
for (i = 0; i < 6; i++)
/* +2 is for the offset of the HW addr type */