treewide: Use array_size() in vzalloc()
[linux-block.git] / drivers / char / raw.c
index 293167c6e2548864d281c105248cb58466bf0650..fd6eec8085b4eee46f2fa15870d2f6287a00f2d4 100644 (file)
@@ -321,7 +321,8 @@ static int __init raw_init(void)
                max_raw_minors = MAX_RAW_MINORS;
        }
 
-       raw_devices = vzalloc(sizeof(struct raw_device_data) * max_raw_minors);
+       raw_devices = vzalloc(array_size(max_raw_minors,
+                                        sizeof(struct raw_device_data)));
        if (!raw_devices) {
                printk(KERN_ERR "Not enough memory for raw device structures\n");
                ret = -ENOMEM;