aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_kmod.c
diff options
context:
space:
mode:
authorThomas Gleixner <[email protected]>2018-06-22 19:20:35 +0000
committerThomas Gleixner <[email protected]>2018-06-22 19:20:35 +0000
commit7731b8bc94e599c9a79e428f3359ff2c34b7576a (patch)
tree879f18ccbe274122f2d4f095b43cbc7f953e0ada /lib/test_kmod.c
parentMAINTAINERS: Add file patterns for x86 device tree bindings (diff)
parentMerge tag '4.18-rc1-more-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 (diff)
downloadkernel-7731b8bc94e599c9a79e428f3359ff2c34b7576a.tar.gz
kernel-7731b8bc94e599c9a79e428f3359ff2c34b7576a.zip
Merge branch 'linus' into x86/urgent
Required to queue a dependent fix.
Diffstat (limited to 'lib/test_kmod.c')
-rw-r--r--lib/test_kmod.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/test_kmod.c b/lib/test_kmod.c
index 0e5b7a61460b..e3ddd836491f 100644
--- a/lib/test_kmod.c
+++ b/lib/test_kmod.c
@@ -779,8 +779,9 @@ static int kmod_config_sync_info(struct kmod_test_device *test_dev)
struct test_config *config = &test_dev->config;
free_test_dev_info(test_dev);
- test_dev->info = vzalloc(config->num_threads *
- sizeof(struct kmod_test_device_info));
+ test_dev->info =
+ vzalloc(array_size(sizeof(struct kmod_test_device_info),
+ config->num_threads));
if (!test_dev->info)
return -ENOMEM;