mirror of https://github.com/thesofproject/sof.git
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:
parent
4366f00249
commit
fec3666a4f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue