]> Pileus Git - ~andy/linux/blobdiff - drivers/char/raw.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[~andy/linux] / drivers / char / raw.c
index b33e8ea314ed0182e746d547e020933e053e5b03..b6de2c0471458d6c9191d32bbad740de904f1ed1 100644 (file)
@@ -324,13 +324,12 @@ static int __init raw_init(void)
                max_raw_minors = MAX_RAW_MINORS;
        }
 
-       raw_devices = vmalloc(sizeof(struct raw_device_data) * max_raw_minors);
+       raw_devices = vzalloc(sizeof(struct raw_device_data) * max_raw_minors);
        if (!raw_devices) {
                printk(KERN_ERR "Not enough memory for raw device structures\n");
                ret = -ENOMEM;
                goto error;
        }
-       memset(raw_devices, 0, sizeof(struct raw_device_data) * max_raw_minors);
 
        ret = register_chrdev_region(dev, max_raw_minors, "raw");
        if (ret)