aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ksz884x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c
index 0f59099ee72f..6c5327af1bf9 100644
--- a/drivers/net/ksz884x.c
+++ b/drivers/net/ksz884x.c
@@ -6322,7 +6322,7 @@ static int netdev_set_eeprom(struct net_device *dev,
6322 int len; 6322 int len;
6323 6323
6324 if (eeprom->magic != EEPROM_MAGIC) 6324 if (eeprom->magic != EEPROM_MAGIC)
6325 return 1; 6325 return -EINVAL;
6326 6326
6327 len = (eeprom->offset + eeprom->len + 1) / 2; 6327 len = (eeprom->offset + eeprom->len + 1) / 2;
6328 for (i = eeprom->offset / 2; i < len; i++) 6328 for (i = eeprom->offset / 2; i < len; i++)