diff options
author | 2018-08-20 18:05:17 +0200 | |
---|---|---|
committer | 2018-08-20 18:05:17 +0200 | |
commit | 415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch) | |
tree | 47492d2386a0e7f00ef645313cb44ae4960b7e7e /lib/interval_tree_test.c | |
parent | HID: hiddev: fix potential Spectre v1 (diff) | |
parent | HID: cougar: Add support for the Cougar 500k Gaming Keyboard (diff) | |
download | linux-dev-415d2b3392d7a80903e0f97f051201aa02bf20e9.tar.xz linux-dev-415d2b3392d7a80903e0f97f051201aa02bf20e9.zip |
Merge branch 'for-4.19/cougar' into for-linus
New device support for hid-cougar
Diffstat (limited to 'lib/interval_tree_test.c')
-rw-r--r-- | lib/interval_tree_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/interval_tree_test.c b/lib/interval_tree_test.c index 835242e74aaa..75509a1511a3 100644 --- a/lib/interval_tree_test.c +++ b/lib/interval_tree_test.c @@ -64,11 +64,12 @@ static int interval_tree_test_init(void) unsigned long results; cycles_t time1, time2, time; - nodes = kmalloc(nnodes * sizeof(struct interval_tree_node), GFP_KERNEL); + nodes = kmalloc_array(nnodes, sizeof(struct interval_tree_node), + GFP_KERNEL); if (!nodes) return -ENOMEM; - queries = kmalloc(nsearches * sizeof(int), GFP_KERNEL); + queries = kmalloc_array(nsearches, sizeof(int), GFP_KERNEL); if (!queries) { kfree(nodes); return -ENOMEM; |