mcs7830: unify return value of .ndo_set_mac_address if address is invalid
authorDanny Kukawka <danny.kukawka@bisect.de>
Tue, 21 Feb 2012 02:07:50 +0000 (02:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2012 22:03:20 +0000 (17:03 -0500)
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>
drivers/net/usb/mcs7830.c

index a29aa9cf9f6ee0c7b04d343829be6d0ca8301d28..c434b6ba033793457581f5aa07b41d175698a057 100644 (file)
@@ -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);