aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/chips/m41t00.c
diff options
context:
space:
mode:
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 554f7ba6162..3df309ae44a 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)
struct i2c_client *client;
int rc;
- client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
+ client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
if (!client)
return -ENOMEM;
- memset(client, 0, sizeof(struct i2c_client));
strncpy(client->name, M41T00_DRV_NAME, I2C_NAME_SIZE);
client->addr = addr;
client->adapter = adap;