diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-12-01 15:54:24 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-02 00:35:56 -0800 |
commit | 8528b016d64a7c1c97ba6540ab53a538348d5026 (patch) | |
tree | 34d777a9e8848b07ccd34fc4db0dc44bc831a018 /drivers/net/e1000e | |
parent | 07f025e6bad7292af3904b8f49cd33e7b5fe3467 (diff) | |
download | op-kernel-dev-8528b016d64a7c1c97ba6540ab53a538348d5026.zip op-kernel-dev-8528b016d64a7c1c97ba6540ab53a538348d5026.tar.gz |
e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom()
Don't use the sizeof the pointer to clear the result
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index b6243ca..0aa50c2 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, if (ret_val) { /* a read error occurred, throw away the result */ - memset(eeprom_buff, 0xff, sizeof(eeprom_buff)); + memset(eeprom_buff, 0xff, sizeof(u16) * + (last_word - first_word + 1)); } else { /* Device's eeprom is always little-endian, word addressable */ for (i = 0; i < last_word - first_word + 1; i++) |