diff options
author | Danny Kukawka <danny.kukawka@bisect.de> | 2012-02-20 21:07:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-23 17:03:20 -0500 |
commit | 7ca1e11ab7d83ec76f3a8ef8704adca8c7518f41 (patch) | |
tree | 47f1dad26d8d81e06ec10f9a212fd86ac6fc0ca8 /net/bridge/br_device.c | |
parent | 15b8f4cf8ea6654c5642358c70b6e84909d99038 (diff) |
br_device: 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>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r-- | net/bridge/br_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index a157bf827d87..ba829de84423 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -167,7 +167,7 @@ static int br_set_mac_address(struct net_device *dev, void *p) | |||
167 | struct sockaddr *addr = p; | 167 | struct sockaddr *addr = p; |
168 | 168 | ||
169 | if (!is_valid_ether_addr(addr->sa_data)) | 169 | if (!is_valid_ether_addr(addr->sa_data)) |
170 | return -EINVAL; | 170 | return -EADDRNOTAVAIL; |
171 | 171 | ||
172 | spin_lock_bh(&br->lock); | 172 | spin_lock_bh(&br->lock); |
173 | if (compare_ether_addr(dev->dev_addr, addr->sa_data)) { | 173 | if (compare_ether_addr(dev->dev_addr, addr->sa_data)) { |