]> err.no Git - linux-2.6/blobdiff - drivers/w1/w1_int.c
Pull throttle into release branch
[linux-2.6] / drivers / w1 / w1_int.c
index 258defdb2efd1cb82d242be2024ab49029a70e58..2fbd8dd16df5d289c8f46029de1559673dcbce67 100644 (file)
@@ -41,7 +41,7 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
        /*
         * We are in process context(kernel thread), so can sleep.
         */
-       dev = kmalloc(sizeof(struct w1_master) + sizeof(struct w1_bus_master), GFP_KERNEL);
+       dev = kzalloc(sizeof(struct w1_master) + sizeof(struct w1_bus_master), GFP_KERNEL);
        if (!dev) {
                printk(KERN_ERR
                        "Failed to allocate %zd bytes for new w1 device.\n",
@@ -49,7 +49,6 @@ static struct w1_master * w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
                return NULL;
        }
 
-       memset(dev, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master));
 
        dev->bus_master = (struct w1_bus_master *)(dev + 1);