fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / mtd / devices / phram.c
index 6c7337f..56cc1ca 100644 (file)
@@ -126,12 +126,10 @@ static int register_device(char *name, unsigned long start, unsigned long len)
        struct phram_mtd_list *new;
        int ret = -ENOMEM;
 
-       new = kmalloc(sizeof(*new), GFP_KERNEL);
+       new = kzalloc(sizeof(*new), GFP_KERNEL);
        if (!new)
                goto out0;
 
-       memset(new, 0, sizeof(*new));
-
        ret = -EIO;
        new->mtd.priv = ioremap(start, len);
        if (!new->mtd.priv) {