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:

committed by
David S. Miller

parent
32d219ed61
commit
504f9b5a6b
@@ -1935,7 +1935,7 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data)
|
||||
netif_err(efx, drv, efx->net_dev,
|
||||
"invalid ethernet MAC address requested: %pM\n",
|
||||
new_addr);
|
||||
return -EINVAL;
|
||||
return -EADDRNOTAVAIL;
|
||||
}
|
||||
|
||||
memcpy(net_dev->dev_addr, new_addr, net_dev->addr_len);
|
||||
|
Reference in New Issue
Block a user