diff options
| author | Deepak Saxena <dsaxena@plexity.net> | 2005-10-17 17:09:43 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:12 -0400 |
| commit | 5263ebb51eb098b01caf229498c954999117e4a7 (patch) | |
| tree | f18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/chips/ds1337.c | |
| parent | ba9c2e8d15da029ea3051c95e446b2d638ef02e2 (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/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 |
