ipc: validate pipeline on stream free IPC.

Make sure we have a valid pipeline for stream free IPC calls.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2017-09-20 12:40:48 +01:00
parent 27d354dbde
commit 7d00023689
1 changed files with 7 additions and 0 deletions

View File

@ -287,6 +287,13 @@ static int ipc_stream_pcm_free(uint32_t header)
return -ENODEV;
}
/* sanity check comp */
if (pcm_dev->cd->pipeline == NULL) {
trace_ipc_error("eF1");
trace_value(free_req->comp_id);
return -EINVAL;
}
/* reset the pipeline */
return pipeline_reset(pcm_dev->cd->pipeline, pcm_dev->cd);
}