Skip to content

Commit

Permalink
br_device: unify return value of .ndo_set_mac_address if address is i…
Browse files Browse the repository at this point in the history
…nvalid

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>
  • Loading branch information
Danny Kukawka authored and David S. Miller committed Feb 23, 2012
1 parent 15b8f4c commit 7ca1e11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int br_set_mac_address(struct net_device *dev, void *p)
struct sockaddr *addr = p;

if (!is_valid_ether_addr(addr->sa_data))
return -EINVAL;
return -EADDRNOTAVAIL;

spin_lock_bh(&br->lock);
if (compare_ether_addr(dev->dev_addr, addr->sa_data)) {
Expand Down

0 comments on commit 7ca1e11

Please sign in to comment.