diff options
Diffstat (limited to 'drivers/macintosh/therm_pm72.c')
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 3d90fc002097..e43554e754a4 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -318,10 +318,9 @@ static struct i2c_client *attach_i2c_chip(int id, const char *name) | |||
318 | if (adap == NULL) | 318 | if (adap == NULL) |
319 | return NULL; | 319 | return NULL; |
320 | 320 | ||
321 | clt = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); | 321 | clt = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); |
322 | if (clt == NULL) | 322 | if (clt == NULL) |
323 | return NULL; | 323 | return NULL; |
324 | memset(clt, 0, sizeof(struct i2c_client)); | ||
325 | 324 | ||
326 | clt->addr = (id >> 1) & 0x7f; | 325 | clt->addr = (id >> 1) & 0x7f; |
327 | clt->adapter = adap; | 326 | clt->adapter = adap; |