pipeline: correct cleanup logic

Currently pipeline_xrun_set_limit cannot fail, but the TODO in the
function suggests that is not planned to be true for the future. Lets
fixup the error logic so when that happens we don't leak a pipeline
definition.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This commit is contained in:
Curtis Malainey 2021-09-14 16:06:06 -07:00 committed by Liam Girdwood
parent 4366f00249
commit fec3666a4f
1 changed files with 1 additions and 0 deletions

View File

@ -353,6 +353,7 @@ int ipc_pipeline_new(struct ipc *ipc, ipc_pipe_new *_pipe_desc)
ret = pipeline_xrun_set_limit(pipe, pipe_desc->xrun_limit_usecs);
if (ret) {
tr_err(&ipc_tr, "ipc_pipeline_new(): pipeline_xrun_set_limit() failed");
pipeline_free(pipe);
return ret;
}