Skip to content

Commit 090f2af

Browse files
cujomalaineylgirdwood
authored andcommitted
cmocka: update create to use standard alloc flow
gotta test all the standard flows Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
1 parent 538006a commit 090f2af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/cmocka/src/audio/mixer/comp_mock.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ static struct comp_dev *mock_comp_new(const struct comp_driver *drv,
2222
const struct comp_ipc_config *config,
2323
const void *spec)
2424
{
25-
struct comp_dev *dev = calloc(1, sizeof(struct comp_dev));
25+
struct comp_dev *dev = comp_alloc(drv, sizeof(*dev));
2626

27-
dev->drv = drv;
2827
return dev;
2928
}
3029

0 commit comments

Comments
 (0)