aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/ethtool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index b6243cad3103..0aa50c229c79 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -535,7 +535,8 @@ static int e1000_get_eeprom(struct net_device *netdev,
535 535
536 if (ret_val) { 536 if (ret_val) {
537 /* a read error occurred, throw away the result */ 537 /* a read error occurred, throw away the result */
538 memset(eeprom_buff, 0xff, sizeof(eeprom_buff)); 538 memset(eeprom_buff, 0xff, sizeof(u16) *
539 (last_word - first_word + 1));
539 } else { 540 } else {
540 /* Device's eeprom is always little-endian, word addressable */ 541 /* Device's eeprom is always little-endian, word addressable */
541 for (i = 0; i < last_word - first_word + 1; i++) 542 for (i = 0; i < last_word - first_word + 1; i++)