[PATCH] e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom()

From: Roel Kluin
Date: Sat Nov 21 2009 - 14:13:54 EST


The sizeof the struct should be used rather than of the pointer

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
drivers/net/e1000e/ethtool.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Unless I am mistaken?

diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index 1bf4d2a..13c658e 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -508,7 +508,7 @@ 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(*eeprom_buff));
} else {
/* Device's eeprom is always little-endian, word addressable */
for (i = 0; i < last_word - first_word + 1; i++)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/