We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce75e06 commit d6f2fd7Copy full SHA for d6f2fd7
drivers/base/regmap/regmap-kunit.c
@@ -1360,7 +1360,7 @@ static void raw_read_defaults(struct kunit *test)
1360
return;
1361
1362
val_len = sizeof(*rval) * (config.max_register + 1);
1363
- rval = kmalloc(val_len, GFP_KERNEL);
+ rval = kunit_kmalloc(test, val_len, GFP_KERNEL);
1364
KUNIT_ASSERT_TRUE(test, rval != NULL);
1365
if (!rval)
1366
@@ -1375,8 +1375,6 @@ static void raw_read_defaults(struct kunit *test)
1375
KUNIT_EXPECT_EQ(test, def, le16_to_cpu((__force __le16)rval[i]));
1376
}
1377
1378
-
1379
- kfree(rval);
1380
1381
1382
static void raw_write_read_single(struct kunit *test)
0 commit comments