diff options
author | Joe Perches <joe@perches.com> | 2011-05-28 19:36:25 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 13:55:03 +0200 |
commit | 8e03bd6525d3281068519d5f6059cdcc5a67af66 (patch) | |
tree | 12e4cecbdef7eb38c8ff4406774008509a70fc47 /drivers/char/raw.c | |
parent | drbd: Convert vmalloc/memset to vzalloc (diff) | |
download | linux-8e03bd6525d3281068519d5f6059cdcc5a67af66.tar.xz linux-8e03bd6525d3281068519d5f6059cdcc5a67af66.zip |
char: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to '')
-rw-r--r-- | drivers/char/raw.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) |