pipeline: pipeline_comp_copy: return once errors happened

We should stop the pipeline copying once errors happened on any
component copying, here fix it.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
Keyon Jie 2019-01-28 15:58:55 +08:00 committed by Liam Girdwood
parent a40e1fd009
commit 51f0821af0
1 changed files with 8 additions and 3 deletions

View File

@ -575,11 +575,16 @@ static int pipeline_comp_copy(struct comp_dev *current, void *data, int dir)
}
/* copy to downstream immediately */
if (current != ppl_data->start && dir == PPL_DIR_DOWNSTREAM)
if (current != ppl_data->start && dir == PPL_DIR_DOWNSTREAM) {
err = comp_copy(current);
if (err < 0)
return err;
}
pipeline_for_each_comp(current, &pipeline_comp_copy, data, NULL,
dir);
err = pipeline_for_each_comp(current, &pipeline_comp_copy,
data, NULL, dir);
if (err < 0)
return err;
if (dir == PPL_DIR_UPSTREAM)
err = comp_copy(current);