From: Danny Kukawka Date: Tue, 21 Feb 2012 02:07:52 +0000 (+0000) Subject: br_device: unify return value of .ndo_set_mac_address if address is invalid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ca1e11ab7d83ec76f3a8ef8704adca8c7518f41;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- 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) 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)) {