You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
char: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
+1
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user