]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
Staging: et131x: unify return value of .ndo_set_mac_address if address is invalid
authorDanny Kukawka <danny.kukawka@bisect.de>
Thu, 23 Feb 2012 22:11:39 +0000 (17:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2012 22:11:39 +0000 (17:11 -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/staging/et131x/et131x.c

index 2c4069fcd9816458837c6ee9c84a7f3aa909961b..b055731f8d887c54d670967bbf1e829bdb515da3 100644 (file)
@@ -5177,7 +5177,7 @@ static int et131x_set_mac_addr(struct net_device *netdev, void *new_mac)
 
        /* Make sure the requested MAC is valid */
        if (!is_valid_ether_addr(address->sa_data))
-               return -EINVAL;
+               return -EADDRNOTAVAIL;
 
        et131x_disable_txrx(netdev);
        et131x_handle_send_interrupt(adapter);