summaryrefslogtreecommitdiff
path: root/drivers/char/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/raw.c')
-rw-r--r--drivers/char/raw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 293167c6e254..fd6eec8085b4 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -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;