diff options
Diffstat (limited to 'drivers/i2c/chips/ds1337.c')
-rw-r--r-- | drivers/i2c/chips/ds1337.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/chips/ds1337.c b/drivers/i2c/chips/ds1337.c index 9d3175c03395..01b037007410 100644 --- a/drivers/i2c/chips/ds1337.c +++ b/drivers/i2c/chips/ds1337.c | |||
@@ -243,11 +243,10 @@ static int ds1337_detect(struct i2c_adapter *adapter, int address, int kind) | |||
243 | I2C_FUNC_I2C)) | 243 | I2C_FUNC_I2C)) |
244 | goto exit; | 244 | goto exit; |
245 | 245 | ||
246 | if (!(data = kmalloc(sizeof(struct ds1337_data), GFP_KERNEL))) { | 246 | if (!(data = kzalloc(sizeof(struct ds1337_data), GFP_KERNEL))) { |
247 | err = -ENOMEM; | 247 | err = -ENOMEM; |
248 | goto exit; | 248 | goto exit; |
249 | } | 249 | } |
250 | memset(data, 0, sizeof(struct ds1337_data)); | ||
251 | INIT_LIST_HEAD(&data->list); | 250 | INIT_LIST_HEAD(&data->list); |
252 | 251 | ||
253 | /* The common I2C client data is placed right before the | 252 | /* The common I2C client data is placed right before the |