Skip to content

Commit

Permalink
ksz884x: fix return value of netdev_set_eeprom
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Rottmann authored and David S. Miller committed Mar 23, 2010
1 parent 8e039d8 commit 4881a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit 4881a4f

Please sign in to comment.