Commit 4881a4f8 authored by Jens Rottmann's avatar Jens Rottmann Committed by David S. Miller

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: default avatarJens Rottmann <JRottmann@LiPPERTEmbedded.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8e039d84
......@@ -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++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment