mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Danny Kukawka <danny.kukawka@bisect.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Danny Kukawka <dkukawka@suse.de>,
	linux-usb@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	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	[thread overview]
Message-ID: <1329826072-14689-3-git-send-email-danny.kukawka@bisect.de> (raw)
In-Reply-To: <1329826072-14689-1-git-send-email-danny.kukawka@bisect.de>

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>
---
 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


  parent reply	other threads:[~2012-02-21 12:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21 12:07 [PATCH 0/4] Part 1: " Danny Kukawka
2012-02-21 12:07 ` [PATCH 1/4] ethernet: " Danny Kukawka
2012-02-21 12:07 ` Danny Kukawka [this message]
2012-02-21 12:07 ` [PATCH 3/4] Staging: et131x: " Danny Kukawka
2012-02-21 12:07 ` [PATCH 4/4] br_device: " Danny Kukawka
2012-02-21 17:22   ` Stephen Hemminger
2012-02-23 22:12 ` [PATCH 0/4] Part 1: " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329826072-14689-3-git-send-email-danny.kukawka@bisect.de \
    --to=danny.kukawka@bisect.de \
    --cc=davem@davemloft.net \
    --cc=dkukawka@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®