mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Danny Kukawka <danny.kukawka@bisect.de>
To: Mark Einon <mark.einon@gmail.com>
Cc: Danny Kukawka <dkukawka@suse.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] Staging: et131x: unify return value of .ndo_set_mac_address if address is invalid
Date: Tue, 21 Feb 2012 13:07:51 +0100	[thread overview]
Message-ID: <1329826072-14689-4-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/staging/et131x/et131x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 2c4069f..b055731 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -5177,7 +5177,7 @@ static int et131x_set_mac_addr(struct net_device *netdev, void *new_mac)
 
 	/* Make sure the requested MAC is valid */
 	if (!is_valid_ether_addr(address->sa_data))
-		return -EINVAL;
+		return -EADDRNOTAVAIL;
 
 	et131x_disable_txrx(netdev);
 	et131x_handle_send_interrupt(adapter);
-- 
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 ` [PATCH 2/4] mcs7830: " Danny Kukawka
2012-02-21 12:07 ` Danny Kukawka [this message]
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-4-git-send-email-danny.kukawka@bisect.de \
    --to=danny.kukawka@bisect.de \
    --cc=davem@davemloft.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=dkukawka@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.einon@gmail.com \
    /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®