aboutsummaryrefslogtreecommitdiff
path: root/lib/kunit/attributes.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kunit/attributes.c')
-rw-r--r--lib/kunit/attributes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kunit/attributes.c b/lib/kunit/attributes.c
index 2cf04cc09372..6d7a53af94a9 100644
--- a/lib/kunit/attributes.c
+++ b/lib/kunit/attributes.c
@@ -410,7 +410,7 @@ struct kunit_suite *kunit_filter_attr_tests(const struct kunit_suite *const suit
kunit_suite_for_each_test_case(suite, test_case) { n++; }
- filtered = kcalloc(n + 1, sizeof(*filtered), GFP_KERNEL);
+ filtered = kzalloc_objs(*filtered, n + 1);
if (!filtered) {
kfree(copy);
return ERR_PTR(-ENOMEM);