Merge ../linux-2.6 by hand
[powerpc.git] / drivers / i2c / busses / i2c-keywest.c
index 34e43c8..d61f748 100644 (file)
@@ -535,13 +535,12 @@ create_iface(struct device_node *np, struct device *dev)
 
        tsize = sizeof(struct keywest_iface) +
                (sizeof(struct keywest_chan) + 4) * nchan;
-       iface = (struct keywest_iface *) kmalloc(tsize, GFP_KERNEL);
+       iface = kzalloc(tsize, GFP_KERNEL);
        if (iface == NULL) {
                printk(KERN_ERR "i2c-keywest: can't allocate inteface !\n");
                pmac_low_i2c_unlock(np);
                return -ENOMEM;
        }
-       memset(iface, 0, tsize);
        spin_lock_init(&iface->lock);
        init_completion(&iface->complete);
        iface->node = of_node_get(np);