[PATCH] i2c: kzalloc conversion, other drivers

Use kzalloc instead of kmalloc+memset in all remaining i2c bus and
chip drivers.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Deepak Saxena
2005-10-17 23:09:43 +02:00
committed by Greg Kroah-Hartman
parent ba9c2e8d15
commit 5263ebb51e
22 changed files with 25 additions and 52 deletions

View File

@@ -171,11 +171,10 @@ int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
| I2C_FUNC_SMBUS_BYTE))
goto exit;
if (!(data = kmalloc(sizeof(struct eeprom_data), GFP_KERNEL))) {
if (!(data = kzalloc(sizeof(struct eeprom_data), GFP_KERNEL))) {
err = -ENOMEM;
goto exit;
}
memset(data, 0, sizeof(struct eeprom_data));
new_client = &data->client;
memset(data->data, 0xff, EEPROM_SIZE);