diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-pmac-smu.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pmac-smu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-pmac-smu.c b/drivers/i2c/busses/i2c-pmac-smu.c index 8a9f5648a23d..bfefe7f7a53d 100644 --- a/drivers/i2c/busses/i2c-pmac-smu.c +++ b/drivers/i2c/busses/i2c-pmac-smu.c | |||
@@ -211,12 +211,11 @@ static int create_iface(struct device_node *np, struct device *dev) | |||
211 | } | 211 | } |
212 | busid = *reg; | 212 | busid = *reg; |
213 | 213 | ||
214 | iface = kmalloc(sizeof(struct smu_iface), GFP_KERNEL); | 214 | iface = kzalloc(sizeof(struct smu_iface), GFP_KERNEL); |
215 | if (iface == NULL) { | 215 | if (iface == NULL) { |
216 | printk(KERN_ERR "i2c-pmac-smu: can't allocate inteface !\n"); | 216 | printk(KERN_ERR "i2c-pmac-smu: can't allocate inteface !\n"); |
217 | return -ENOMEM; | 217 | return -ENOMEM; |
218 | } | 218 | } |
219 | memset(iface, 0, sizeof(struct smu_iface)); | ||
220 | init_completion(&iface->complete); | 219 | init_completion(&iface->complete); |
221 | iface->busid = busid; | 220 | iface->busid = busid; |
222 | 221 | ||