From 8e03bd6525d3281068519d5f6059cdcc5a67af66 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Sat, 28 May 2011 10:36:25 -0700 Subject: char: Convert vmalloc/memset to vzalloc Signed-off-by: Joe Perches Signed-off-by: Jiri Kosina --- drivers/char/raw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/char/raw.c') diff --git a/drivers/char/raw.c b/drivers/char/raw.c index b33e8ea314ed..b6de2c047145 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c @@ -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) -- cgit v1.2.1