aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-02-20 21:07:49 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-23 17:03:20 -0500
commit504f9b5a6bb5336ad434438d0cdd61a16db80129 (patch)
tree307356c1d47a8300fd4973159edaad130c5cda9f /drivers/net/ethernet/sfc
parent32d219ed61a97f6591a941e23673b2c1dd8628e7 (diff)
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>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/efx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index c7004dcb5838..1908ba7ca7e6 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -1935,7 +1935,7 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data)
1935 netif_err(efx, drv, efx->net_dev, 1935 netif_err(efx, drv, efx->net_dev,
1936 "invalid ethernet MAC address requested: %pM\n", 1936 "invalid ethernet MAC address requested: %pM\n",
1937 new_addr); 1937 new_addr);
1938 return -EINVAL; 1938 return -EADDRNOTAVAIL;
1939 } 1939 }
1940 1940
1941 memcpy(net_dev->dev_addr, new_addr, net_dev->addr_len); 1941 memcpy(net_dev->dev_addr, new_addr, net_dev->addr_len);