Skip to content

Commit

Permalink
mcs7830: unify return value of .ndo_set_mac_address if address is inv…
Browse files Browse the repository at this point in the history
…alid

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>
  • Loading branch information
Danny Kukawka authored and David S. Miller committed Feb 23, 2012
1 parent 504f9b5 commit 15b8f4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/mcs7830.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static int mcs7830_set_mac_address(struct net_device *netdev, void *p)
return -EBUSY;

if (!is_valid_ether_addr(addr->sa_data))
return -EINVAL;
return -EADDRNOTAVAIL;

ret = mcs7830_hif_set_mac_address(dev, addr->sa_data);

Expand Down

0 comments on commit 15b8f4c

Please sign in to comment.