All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
To: "David S. Miller" <davem@davemloft.net>
Cc: Tristram Ha <Tristram.Ha@micrel.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ksz884x: fix return value of netdev_set_eeprom
Date: Tue, 23 Mar 2010 15:23:50 +0100	[thread overview]
Message-ID: <4BA8CEF6.2010707@LiPPERTEmbedded.de> (raw)

ksz884x: fix return value of netdev_set_eeprom

netdev_set_eeprom() confused ethtool by just returning 1 on error
instead of a proper -EINVAL.

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
---

--- linux-2.6.34-rc2-git1/drivers/net/ksz884x.c
+++ return_value_fixed/drivers/net/ksz884x.c
@@ -6322,7 +6322,7 @@ static int netdev_set_eeprom(struct net_
 	int len;

 	if (eeprom->magic != EEPROM_MAGIC)
-		return 1;
+		return -EINVAL;

 	len = (eeprom->offset + eeprom->len + 1) / 2;
 	for (i = eeprom->offset / 2; i < len; i++)
_


             reply	other threads:[~2010-03-23 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 14:23 Jens Rottmann [this message]
2010-03-23 20:09 ` [PATCH] ksz884x: fix return value of netdev_set_eeprom 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=4BA8CEF6.2010707@LiPPERTEmbedded.de \
    --to=jrottmann@lippertembedded.de \
    --cc=Tristram.Ha@micrel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.