Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755239Ab2BUMIQ (ORCPT ); Tue, 21 Feb 2012 07:08:16 -0500 Received: from wp188.webpack.hosteurope.de ([80.237.132.195]:57437 "EHLO wp188.webpack.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754198Ab2BUMIM (ORCPT ); Tue, 21 Feb 2012 07:08:12 -0500 From: Danny Kukawka To: Greg Kroah-Hartman Cc: Danny Kukawka , linux-usb@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] mcs7830: unify return value of .ndo_set_mac_address if address is invalid Date: Tue, 21 Feb 2012 13:07:50 +0100 Message-Id: <1329826072-14689-3-git-send-email-danny.kukawka@bisect.de> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1329826072-14689-1-git-send-email-danny.kukawka@bisect.de> References: <1329826072-14689-1-git-send-email-danny.kukawka@bisect.de> X-bounce-key: webpack.hosteurope.de;danny.kukawka@bisect.de;1329826092;f5aaca81; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 989 Lines: 30 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 --- drivers/net/usb/mcs7830.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index a29aa9c..c434b6b 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c @@ -239,7 +239,7 @@ static int mcs7830_set_mac_address(struct net_device *netdev, void *p) return -EBUSY; if (!is_valid_ether_addr(addr->sa_data)) - return -EINVAL; + return -EADDRNOTAVAIL; ret = mcs7830_hif_set_mac_address(dev, addr->sa_data); -- 1.7.8.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/