aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ksz884x.c
diff options
context:
space:
mode:
authorJens Rottmann <JRottmann@LiPPERTEmbedded.de>2010-03-23 00:23:50 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-23 16:06:15 -0400
commit4881a4f89a95cc5fef6d32953954bcc3443eefd5 (patch)
tree7bbbf2c6e43538f7cb9cfbe8943d4ea02381ca46 /drivers/net/ksz884x.c
parent8e039d84b323c4503c4d56863faa47c783660826 (diff)
ksz884x: fix return value of netdev_set_eeprom
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ksz884x.c')
-rw-r--r--drivers/net/ksz884x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c
index 0f59099ee72f..6c5327af1bf9 100644
--- a/drivers/net/ksz884x.c
+++ b/drivers/net/ksz884x.c
@@ -6322,7 +6322,7 @@ static int netdev_set_eeprom(struct net_device *dev,
6322 int len; 6322 int len;
6323 6323
6324 if (eeprom->magic != EEPROM_MAGIC) 6324 if (eeprom->magic != EEPROM_MAGIC)
6325 return 1; 6325 return -EINVAL;
6326 6326
6327 len = (eeprom->offset + eeprom->len + 1) / 2; 6327 len = (eeprom->offset + eeprom->len + 1) / 2;
6328 for (i = eeprom->offset / 2; i < len; i++) 6328 for (i = eeprom->offset / 2; i < len; i++)