diff options
Diffstat (limited to 'drivers/macintosh/windfarm_lm75_sensor.c')
-rw-r--r-- | drivers/macintosh/windfarm_lm75_sensor.c | 3 |
1 files changed, 1 insertions, 2 deletions
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 ... |