Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8528b016 authored by Roel Kluin's avatar Roel Kluin Committed by David S. Miller
Browse files

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 07f025e6
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -535,7 +535,8 @@ static int e1000_get_eeprom(struct net_device *netdev,


	if (ret_val) {
	if (ret_val) {
		/* a read error occurred, throw away the result */
		/* 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 {
	} else {
		/* Device's eeprom is always little-endian, word addressable */
		/* Device's eeprom is always little-endian, word addressable */
		for (i = 0; i < last_word - first_word + 1; i++)
		for (i = 0; i < last_word - first_word + 1; i++)