From: Patrick McHardy Date: Mon, 14 Apr 2008 05:45:40 +0000 (-0700) Subject: [NET]: Return more appropriate error from eth_validate_addr(). X-Git-Tag: v2.6.25~33^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2ed9926e16094ad143b96b09c64cba8bcba05ee1;p=linux-2.6-omap-h63xx.git [NET]: Return more appropriate error from eth_validate_addr(). Paul Bolle wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=9923 would have been much easier to > track down if eth_validate_addr() would somehow complain aloud if an address > is invalid. Shouldn't it make at least some noise? I guess it should return -EADDRNOTAVAIL similar to eth_mac_addr() when validation fails. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index a7b417523e9..a80839b02e3 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c @@ -301,7 +301,7 @@ static int eth_change_mtu(struct net_device *dev, int new_mtu) static int eth_validate_addr(struct net_device *dev) { if (!is_valid_ether_addr(dev->dev_addr)) - return -EINVAL; + return -EADDRNOTAVAIL; return 0; }