summaryrefslogtreecommitdiff
path: root/lib/tests/test_ratelimit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests/test_ratelimit.c')
-rw-r--r--lib/tests/test_ratelimit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tests/test_ratelimit.c b/lib/tests/test_ratelimit.c
index bfaeca49304a..365f1fc1f256 100644
--- a/lib/tests/test_ratelimit.c
+++ b/lib/tests/test_ratelimit.c
@@ -104,7 +104,8 @@ static void test_ratelimit_stress(struct kunit *test)
int i;
const int n_stress_kthread = cpumask_weight(cpu_online_mask);
struct stress_kthread skt = { 0 };
- struct stress_kthread *sktp = kcalloc(n_stress_kthread, sizeof(*sktp), GFP_KERNEL);
+ struct stress_kthread *sktp = kzalloc_objs(*sktp, n_stress_kthread,
+ GFP_KERNEL);
KUNIT_EXPECT_NOT_NULL_MSG(test, sktp, "Memory allocation failure");
for (i = 0; i < n_stress_kthread; i++) {