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>
This commit is contained in:
Jens Rottmann 2010-03-23 04:23:50 +00:00 committed by David S. Miller
parent 8e039d84b3
commit 4881a4f89a

View File

@ -6322,7 +6322,7 @@ static int netdev_set_eeprom(struct net_device *dev,
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++)