aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/m41t00.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-10-17 17:09:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:12 -0400
commit5263ebb51eb098b01caf229498c954999117e4a7 (patch)
treef18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/chips/m41t00.c
parentba9c2e8d15da029ea3051c95e446b2d638ef02e2 (diff)
[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>
Diffstat (limited to 'drivers/i2c/chips/m41t00.c')
-rw-r--r--drivers/i2c/chips/m41t00.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/chips/m41t00.c b/drivers/i2c/chips/m41t00.c
index 554f7ba61627..3df309ae44a6 100644
--- a/drivers/i2c/chips/m41t00.c
+++ b/drivers/i2c/chips/m41t00.c
@@ -174,11 +174,10 @@ m41t00_probe(struct i2c_adapter *adap, int addr, int kind)
174 struct i2c_client *client; 174 struct i2c_client *client;
175 int rc; 175 int rc;
176 176
177 client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); 177 client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
178 if (!client) 178 if (!client)
179 return -ENOMEM; 179 return -ENOMEM;
180 180
181 memset(client, 0, sizeof(struct i2c_client));
182 strncpy(client->name, M41T00_DRV_NAME, I2C_NAME_SIZE); 181 strncpy(client->name, M41T00_DRV_NAME, I2C_NAME_SIZE);
183 client->addr = addr; 182 client->addr = addr;
184 client->adapter = adap; 183 client->adapter = adap;