提交 4881a4f8 编写于 作者: J Jens Rottmann 提交者: 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: NJens Rottmann <JRottmann@LiPPERTEmbedded.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册