Subject: [PATCH] ksz884x: fix return value of netdev_set_eeprom

From: Jens Rottmann <[email-masked]>
Date: Tue, 23 Mar 2010 15:23:50 +0100

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 <[email-masked]>
---

--- linux-2.6.34-rc2-git1/drivers/net/ksz884x.c
+++ return_value_fixed/drivers/net/ksz884x.c
@@ -6322,7 +6322,7 @@ static int netdev_set_eeprom(struct net_
 	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++)
_