summaryrefslogtreecommitdiff
path: root/lib/kunit/executor.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2026-04-16 22:01:18 +0300
committerJiri Kosina <jkosina@suse.com>2026-04-16 22:01:18 +0300
commitd4eb7b2da66c848709e31585b9c371fa234abc39 (patch)
tree5c6311cfa45567ecdcb8946a2252da7d55d1ac10 /lib/kunit/executor.c
parent8b9a097eb2fc37b486afd81388c693bf3ab44466 (diff)
parent69c02ffde6ed4d535fa4e693a9e572729cad3d0d (diff)
downloadlinux-d4eb7b2da66c848709e31585b9c371fa234abc39.tar.xz
Merge branch 'for-7.1/core-v2' into for-linus
- fixed handling of 0-sized reports (Dmitry Torokhov) - convert core code to __free() (Dmitry Torokhov) - support for multiple batteries per HID device (Lucas Zampieri)
Diffstat (limited to 'lib/kunit/executor.c')
-rw-r--r--lib/kunit/executor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/kunit/executor.c b/lib/kunit/executor.c
index 02ff380ab793..1fef217de11d 100644
--- a/lib/kunit/executor.c
+++ b/lib/kunit/executor.c
@@ -131,7 +131,7 @@ kunit_filter_glob_tests(const struct kunit_suite *const suite, const char *test_
if (!copy)
return ERR_PTR(-ENOMEM);
- filtered = kcalloc(n + 1, sizeof(*filtered), GFP_KERNEL);
+ filtered = kzalloc_objs(*filtered, n + 1);
if (!filtered) {
kfree(copy);
return ERR_PTR(-ENOMEM);
@@ -179,7 +179,7 @@ kunit_filter_suites(const struct kunit_suite_set *suite_set,
const size_t max = suite_set->end - suite_set->start;
- copy = kcalloc(max, sizeof(*copy), GFP_KERNEL);
+ copy = kzalloc_objs(*copy, max);
if (!copy) { /* won't be able to run anything, return an empty set */
return filtered;
}
@@ -194,7 +194,7 @@ kunit_filter_suites(const struct kunit_suite_set *suite_set,
/* Parse attribute filters */
if (filters) {
filter_count = kunit_get_filter_count(filters);
- parsed_filters = kcalloc(filter_count, sizeof(*parsed_filters), GFP_KERNEL);
+ parsed_filters = kzalloc_objs(*parsed_filters, filter_count);
if (!parsed_filters) {
*err = -ENOMEM;
goto free_parsed_glob;