Skip to contentSkip to conversation

Incorrect memset in eeprom.c

PATCH New Jean Delvare 2 participants 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Incorrect memset in eeprom.c

Quoting Ralf Roesch:

Quoted 2 lines

currently I'm only working with Linux MIPS 2.4 kernel, so it would be nice if you could forward the patch for 2.6.

OK, so here we are. Greg, this is the port to 2.6 of Ralf patch that fixes an incorrect memset while initializing the eeprom driver. Please apply.

Thanks.

drivers/i2c/chips/eeprom.c renamed from drivers/i2c/chips/eeprom.c.orig +1 -1
@@ -197,7 +197,7 @@
 				 sizeof(struct eeprom_data));
 
 	data = (struct eeprom_data *) (new_client + 1);
-	memset(data, 0xff, EEPROM_SIZE);
+	memset(data->data, 0xff, EEPROM_SIZE);
 	i2c_set_clientdata(new_client, data);
 	new_client->addr = address;
 	new_client->adapter = adapter;
Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
Applied
#1 lore raw

PATCH 1/1 Incorrect memset in eeprom.c

Quoted 8 lines · Jean Delvare

Quoting Ralf Roesch:

Quoted 2 lines

currently I'm only working with Linux MIPS 2.4 kernel, so it would be nice if you could forward the patch for 2.6.

OK, so here we are. Greg, this is the port to 2.6 of Ralf patch that fixes an incorrect memset while initializing the eeprom driver. Please apply.

Applied, thanks.

greg k-h