aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/macio_asic.c3
-rw-r--r--drivers/macintosh/smu.c3
-rw-r--r--drivers/macintosh/therm_pm72.c3
-rw-r--r--drivers/macintosh/therm_windtunnel.c3
-rw-r--r--drivers/macintosh/windfarm_lm75_sensor.c3
5 files changed, 5 insertions, 10 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index c96b7fe882a4..ec9e5f32f0ae 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -365,10 +365,9 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
365 if (np == NULL) 365 if (np == NULL)
366 return NULL; 366 return NULL;
367 367
368 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 368 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
369 if (!dev) 369 if (!dev)
370 return NULL; 370 return NULL;
371 memset(dev, 0, sizeof(*dev));
372 371
373 dev->bus = &chip->lbus; 372 dev->bus = &chip->lbus;
374 dev->media_bay = in_bay; 373 dev->media_bay = in_bay;
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index f8e1a135bf9d..d409f6759482 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -1053,10 +1053,9 @@ static int smu_open(struct inode *inode, struct file *file)
1053 struct smu_private *pp; 1053 struct smu_private *pp;
1054 unsigned long flags; 1054 unsigned long flags;
1055 1055
1056 pp = kmalloc(sizeof(struct smu_private), GFP_KERNEL); 1056 pp = kzalloc(sizeof(struct smu_private), GFP_KERNEL);
1057 if (pp == 0) 1057 if (pp == 0)
1058 return -ENOMEM; 1058 return -ENOMEM;
1059 memset(pp, 0, sizeof(struct smu_private));
1060 spin_lock_init(&pp->lock); 1059 spin_lock_init(&pp->lock);
1061 pp->mode = smu_file_commands; 1060 pp->mode = smu_file_commands;
1062 init_waitqueue_head(&pp->wait); 1061 init_waitqueue_head(&pp->wait);
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;
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index 3d0354e96a97..5452da1bb1a5 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -431,9 +431,8 @@ do_probe( struct i2c_adapter *adapter, int addr, int kind )
431 | I2C_FUNC_SMBUS_WRITE_BYTE) ) 431 | I2C_FUNC_SMBUS_WRITE_BYTE) )
432 return 0; 432 return 0;
433 433
434 if( !(cl=kmalloc(sizeof(*cl), GFP_KERNEL)) ) 434 if( !(cl=kzalloc(sizeof(*cl), GFP_KERNEL)) )
435 return -ENOMEM; 435 return -ENOMEM;
436 memset( cl, 0, sizeof(struct i2c_client) );
437 436
438 cl->addr = addr; 437 cl->addr = addr;
439 cl->adapter = adapter; 438 cl->adapter = adapter;
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c
index a0fabf3c2008..7e10c3ab4d50 100644
--- a/drivers/macintosh/windfarm_lm75_sensor.c
+++ b/drivers/macintosh/windfarm_lm75_sensor.c
@@ -117,10 +117,9 @@ static struct wf_lm75_sensor *wf_lm75_create(struct i2c_adapter *adapter,
117 DBG("wf_lm75: creating %s device at address 0x%02x\n", 117 DBG("wf_lm75: creating %s device at address 0x%02x\n",
118 ds1775 ? "ds1775" : "lm75", addr); 118 ds1775 ? "ds1775" : "lm75", addr);
119 119
120 lm = kmalloc(sizeof(struct wf_lm75_sensor), GFP_KERNEL); 120 lm = kzalloc(sizeof(struct wf_lm75_sensor), GFP_KERNEL);
121 if (lm == NULL) 121 if (lm == NULL)
122 return NULL; 122 return NULL;
123 memset(lm, 0, sizeof(struct wf_lm75_sensor));
124 123
125 /* Usual rant about sensor names not beeing very consistent in 124 /* Usual rant about sensor names not beeing very consistent in
126 * the device-tree, oh well ... 125 * the device-tree, oh well ...